SSC / frontend /src /pages /profile.module.css
Hkoradiya123
Refactor ProfilePage: Remove performance logs management, add AI insights refresh functionality, and update UI components for better user experience. Enhance admin and dashboard styles for improved layout and usability. Integrate Groq AI for performance insights generation and analysis.
7d996b5
Raw History Blame Contribute Delete
7.89 kB
.profilePage {
min-height: calc(100vh - 70px);
padding: 30px 20px 50px;
background:
radial-gradient(circle at 86% 12%, rgba(255, 160, 25, 0.16), transparent 32%),
radial-gradient(circle at 14% 18%, rgba(25, 164, 137, 0.15), transparent 36%),
#f3f9f8;
}
.container {
max-width: 1220px;
margin: 0 auto;
}
.loading {
text-align: center;
padding: 60px 20px;
font-size: 18px;
color: #5f6368;
}
.profileHeader {
background: white;
padding: 24px;
border-radius: 12px;
margin-bottom: 18px;
display: flex;
justify-content: space-between;
align-items: flex-start;
box-shadow: 0 12px 28px rgba(16, 60, 54, 0.08);
border: 1px solid #dcece8;
gap: 16px;
}
.profileInfo h1 {
margin-bottom: 10px;
color: #153934;
font-size: clamp(30px, 4.5vw, 40px);
}
.premiumBadge {
display: inline-block;
background: linear-gradient(135deg, #f3af30, #e17800);
color: #1f261f;
padding: 6px 12px;
border-radius: 20px;
font-weight: 700;
margin-bottom: 10px;
}
.email {
color: #4f6964;
margin: 5px 0;
}
.bio {
color: #244742;
margin-top: 10px;
font-size: 15px;
}
.premiumBtn {
background: linear-gradient(135deg, #13856f, #0f6254);
color: white;
padding: 10px 18px;
border: none;
border-radius: 10px;
font-weight: 700;
cursor: pointer;
transition: opacity 0.3s;
white-space: nowrap;
}
.premiumBtn:hover {
opacity: 0.9;
}
/* Stats Section */
.statsSection {
margin-bottom: 18px;
background: white;
border: 1px solid #dcece8;
border-radius: 14px;
box-shadow: 0 12px 28px rgba(16, 60, 54, 0.08);
padding: 20px;
}
.statsSection h2 {
color: #153934;
}
.sectionHeader {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
margin-bottom: 14px;
}
.inlineBtn {
border: none;
border-radius: 10px;
padding: 8px 12px;
background: #e8f5f2;
color: #166152;
font-weight: 700;
}
.inlineBtn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.statsGrid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 10px;
}
.statBox {
background: #f8fcfb;
padding: 14px;
border-radius: 10px;
text-align: center;
border: 1px solid #e2efec;
}
.statLabel {
display: block;
color: #56716c;
font-size: 12px;
text-transform: uppercase;
margin-bottom: 10px;
}
.statValue {
display: block;
font-size: 24px;
font-weight: bold;
color: #106f5d;
}
.statBox input {
width: 100%;
border: 1px solid #cde0db;
border-radius: 8px;
padding: 8px;
text-align: center;
}
.saveRow {
margin-top: 14px;
display: flex;
justify-content: flex-end;
}
.saveBtn {
background: linear-gradient(135deg, #15846e, #0f6455);
color: #fff;
border: none;
border-radius: 10px;
padding: 9px 14px;
font-weight: 700;
}
/* Performance Section */
.performanceSection {
background: white;
padding: 20px;
border-radius: 14px;
border: 1px solid #dcece8;
box-shadow: 0 12px 28px rgba(16, 60, 54, 0.08);
margin-bottom: 18px;
}
.performanceSection h2 {
margin-bottom: 14px;
color: #153934;
}
.logForm {
border: 1px solid #dcece8;
border-radius: 12px;
padding: 14px;
margin-bottom: 14px;
background: #f8fcfb;
}
.logForm h3 {
margin-bottom: 10px;
color: #29544d;
}
.logGrid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
gap: 8px;
margin-bottom: 8px;
}
.logForm input,
.logForm select,
.logForm textarea {
border: 1px solid #cde0db;
border-radius: 8px;
padding: 8px;
}
.logForm textarea {
width: 100%;
min-height: 70px;
resize: vertical;
margin-bottom: 8px;
}
.logForm button {
border: none;
border-radius: 10px;
background: #0f7a66;
color: #fff;
padding: 9px 12px;
font-weight: 700;
}
.performancesList {
display: flex;
flex-direction: column;
gap: 10px;
}
.performanceItem {
padding: 12px;
background-color: #f8fcfb;
border-radius: 10px;
border: 1px solid #dcece8;
display: grid;
grid-template-columns: 1fr auto auto;
gap: 12px;
align-items: center;
}
.perfDate {
font-weight: 500;
color: #1f453f;
margin-bottom: 4px;
}
.perfOpponent {
color: #55736e;
font-size: 14px;
}
.perfType {
color: #6b8b85;
font-size: 12px;
text-transform: uppercase;
margin-top: 4px;
}
.perfStats {
display: flex;
gap: 12px;
}
.runs,
.wickets {
padding: 6px 12px;
border-radius: 8px;
font-weight: 500;
font-size: 14px;
}
.runs {
background-color: #def5ee;
color: #156d59;
}
.wickets {
background-color: #ffe8cf;
color: #9c4f00;
}
.rating {
padding: 6px 10px;
border-radius: 8px;
background: #e8f0ff;
color: #2258a6;
font-size: 13px;
}
.actions {
display: flex;
gap: 6px;
}
.actions button {
border: none;
border-radius: 8px;
background: #0f7a66;
color: #fff;
padding: 6px 10px;
font-size: 12px;
}
.actions .deleteBtn {
background: #c74242;
}
.editLogGrid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
gap: 8px;
grid-column: 1 / -1;
}
.editLogGrid input,
.editLogGrid select {
border: 1px solid #cde0db;
border-radius: 8px;
padding: 7px;
}
.actionButtons {
display: flex;
gap: 8px;
}
.actionButtons .cancelBtn {
background: #d2dfdd;
color: #34524d;
}
.aiSection {
background: #ffffff;
border: 1px solid #dcece8;
border-radius: 14px;
box-shadow: 0 12px 28px rgba(16, 60, 54, 0.08);
padding: 20px;
margin-bottom: 18px;
}
.aiSection h2 {
color: #153934;
margin-bottom: 10px;
}
.aiGrid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
gap: 10px;
margin-bottom: 12px;
}
.aiCard {
border: 1px solid #dcece8;
border-radius: 10px;
padding: 12px;
background: #f8fcfb;
}
.aiCard span {
display: block;
color: #5b7a74;
font-size: 12px;
text-transform: uppercase;
margin-bottom: 4px;
}
.aiCard strong {
color: #0e5f51;
font-size: 22px;
}
.aiTextGrid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}
.aiTextGrid h4 {
color: #2f5852;
margin-bottom: 6px;
}
.aiTextGrid ul {
margin: 0;
padding-left: 18px;
color: #4f6d68;
display: flex;
flex-direction: column;
gap: 6px;
}
.aiTextBlock {
border: 1px solid #dcece8;
border-radius: 10px;
background: #f8fcfb;
padding: 12px;
display: flex;
flex-direction: column;
gap: 8px;
color: #355853;
}
.aiTextBlock p {
margin: 0;
line-height: 1.4;
}
.chatSection {
background: #ffffff;
border: 1px solid #dcece8;
border-radius: 14px;
box-shadow: 0 12px 28px rgba(16, 60, 54, 0.08);
padding: 20px;
}
.chatSection h2 {
color: #153934;
margin-bottom: 10px;
}
.chatMessages {
max-height: 260px;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 10px;
}
.chatAdmin,
.chatPlayer {
max-width: 80%;
border-radius: 10px;
padding: 8px 10px;
display: flex;
flex-direction: column;
gap: 3px;
}
.chatAdmin {
align-self: flex-start;
background: #e8f1ff;
color: #2a4f84;
}
.chatPlayer {
align-self: flex-end;
background: #def5ee;
color: #1f5d4f;
}
.chatAdmin small,
.chatPlayer small {
font-size: 11px;
opacity: 0.7;
}
.chatForm {
display: grid;
grid-template-columns: 1fr auto;
gap: 8px;
}
.chatForm input {
border: 1px solid #cde0db;
border-radius: 10px;
padding: 10px;
}
.chatForm button {
border: none;
border-radius: 10px;
background: #0f7a66;
color: #fff;
padding: 10px 13px;
font-weight: 700;
}
@media (max-width: 900px) {
.profileHeader {
flex-direction: column;
}
.performanceItem {
grid-template-columns: 1fr;
}
.aiTextGrid {
grid-template-columns: 1fr;
}
}
@media (max-width: 760px) {
.profilePage {
padding: 20px 12px 34px;
}
.statsSection,
.performanceSection,
.aiSection,
.chatSection {
padding: 14px;
}
.chatForm {
grid-template-columns: 1fr;
}
}