/* ClubChess - Modern Redesign with Glassmorphism */
/* Design System based on provided color palette */

:root {
    /* Backgrounds */
    --bg-main: #0a1a30;
    --bg-panel: rgba(22, 37, 58, 0.7); /* For Glassmorphism */
    
    /* Brand Colors */
    --accent-teal: #35b0b2;
    --accent-purple: #707fd4;
    --accent-deep-indigo: #502c7f;
    
    /* Text */
    --text-primary: #fefefe;
    --text-muted: #606b82;
    
    /* Borders & Shadows */
    --border-glow: rgba(53, 176, 178, 0.3);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-teal), var(--accent-purple));
    --gradient-secondary: linear-gradient(135deg, var(--accent-purple), var(--accent-deep-indigo));
    --gradient-dark: linear-gradient(135deg, #0a1a30, #152642);
    
    /* Effects */
    --glass-blur: blur(10px);
    --shadow-glow: 0 0 20px rgba(53, 176, 178, 0.3);
    --shadow-panel: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background: var(--bg-main);
    color: var(--text-primary);
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(53, 176, 178, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(112, 127, 212, 0.15) 0%, transparent 50%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glassmorphism Base */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-panel);
}

.glass-card {
    background: rgba(22, 37, 58, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2rem;
    color: var(--text-primary);
}

h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

p {
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(53, 176, 178, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(53, 176, 178, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-teal);
    border: 2px solid var(--accent-teal);
}

.btn-secondary:hover {
    background: rgba(53, 176, 178, 0.1);
    transform: translateY(-2px);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-teal);
}

/* Navigation */
.navbar {
    background: rgba(10, 26, 48, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-logo span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background: rgba(53, 176, 178, 0.1);
    color: var(--accent-teal);
}

.nav-link.active {
    background: rgba(53, 176, 178, 0.2);
    color: var(--accent-teal);
    border-left: 3px solid var(--accent-teal);
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Grid System */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Cards */
.card {
    padding: 2rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(53, 176, 178, 0.1);
}

/* Chat Specific Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.chat-message {
    padding: 12px 16px;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 3px solid var(--accent-teal);
}

.chat-message.self {
    background: rgba(53, 176, 178, 0.1);
    border-left-color: var(--accent-purple);
}

.chat-input-area {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
}

/* Player List */
.player-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.player-item:hover {
    background: rgba(53, 176, 178, 0.1);
    transform: translateX(4px);
}

.player-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.player-status.online {
    background: var(--accent-teal);
    box-shadow: 0 0 10px var(--accent-teal);
}

.player-status.playing {
    background: var(--accent-purple);
    box-shadow: 0 0 10px var(--accent-purple);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(53, 176, 178, 0.3); }
    50% { box-shadow: 0 0 30px rgba(53, 176, 178, 0.5); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.glow {
    animation: glow 2s infinite;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
    }
    
    .main-container {
        padding: 0 1rem;
    }
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: var(--gradient-primary);
}

.glass-effect {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
}

.shadow-glow {
    box-shadow: var(--shadow-glow);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* User Profile Popup */
.user-profile-popup {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--club-color, #35b0b2);
    border-radius: 16px;
    box-shadow: 0 0 24px color-mix(in srgb, var(--club-color, #35b0b2) 35%, transparent), var(--shadow-panel);
    width: 320px;
    max-width: 90vw;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
    z-index: 10010;
    transition: transform 0.3s ease;
}

.user-profile-popup.slide-left {
    transform: translateX(-379px); /* 10cm */
}

/* Chessboard modal */
.chess-square {
    width: 100%;
    height: 100%;
}
.chess-square.light {
    background-color: #f0d9b5;
}
.chess-square.dark {
    background-color: #b58863;
}

.profile-header {
    background: var(--gradient-dark);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--club-color, #35b0b2);
}

.profile-header h4 {
    margin: 0;
    color: var(--club-color, #35b0b2);
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 0 8px color-mix(in srgb, var(--club-color, #35b0b2) 50%, transparent);
}

.close-profile-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-profile-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-teal);
}

.profile-content {
    padding: 1.5rem;
}

.rating-section {
    margin-bottom: 1.5rem;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.rating-item:hover {
    background: rgba(53, 176, 178, 0.1);
    transform: translateX(4px);
}

.rating-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.rating-label {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.rating-value {
    color: var(--accent-teal);
    font-weight: 600;
    margin-right: 0.5rem;
    font-size: 1rem;
}

.rating-item img.rank-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.rating-item .history-link {
    margin-left: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.rating-item .history-link:hover {
    opacity: 1;
}

.tokens-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(112, 127, 212, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(112, 127, 212, 0.3);
    margin-bottom: 1.5rem;
}

.tokens-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.tokens-label {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.tokens-value {
    color: var(--accent-purple);
    font-weight: 700;
    font-size: 1.1rem;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.private-chat-btn {
    background: var(--gradient-primary);
    color: white;
}

.challenge-btn {
    background: var(--gradient-secondary);
    color: white;
}

.report-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-icon {
    font-size: 1rem;
}

/* User Profile Popup Overlay */
#userProfilePopupContainer {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10009;
}

/* Glass Modal Styles */
.glass-modal-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10007;
}

.glass-modal {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: var(--shadow-panel);
    animation: modalSlideIn 0.4s ease forwards;
    overflow: hidden;
}

.glass-modal-header {
    background: var(--gradient-dark);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--glass-border);
    margin: -40px -40px 30px -40px;
}

.glass-modal-title {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin: 0;
    font-weight: 600;
}

.glass-modal-close {
    background: none;
    border: none;
    color: var(--accent-teal);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.glass-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-teal);
    transform: scale(1.1);
}

.glass-modal-content {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

.glass-modal-content::-webkit-scrollbar {
    width: 8px;
}

.glass-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.glass-modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-teal);
    border-radius: 4px;
}

.glass-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.glass-modal-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.glass-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-teal);
    transform: translateY(-2px);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tasks & Achievements Styling */
.tasks-panel {
    background: rgba(22, 37, 58, 0.8);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.tasks-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.tasks-container::-webkit-scrollbar {
    width: 6px;
}

.tasks-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.tasks-container::-webkit-scrollbar-thumb {
    background: var(--accent-teal);
    border-radius: 3px;
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.task-item {
    background: #1c1e21;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.task-item-progress-wrap {
    width: 100%;
    margin-top: 6px;
}
.task-item-progress-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 3px;
    letter-spacing: 0.4px;
}
.task-item-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
}
.task-item-progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #35b0b2, #2ecc71);
    transition: width 0.5s ease;
}

.task-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.task-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-teal);
    background: rgba(22, 37, 58, 0.8);
}

.task-item:hover::before {
    opacity: 1;
}

.task-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    flex-shrink: 0;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.task-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 8px;
}

.task-reward {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #f1c40f;
    font-size: 1.1rem;
}

.task-reward img.token-icon {
    width: 32px !important;
    height: 32px !important;
    vertical-align: middle;
}

.task-status {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.task-status.completed {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}

.task-status.completed i {
    content: "\f00c";
}

.task-status i {
    font-size: 1rem;
}

.task-status {
    display: none;
}

.task-content {
    position: relative;
    padding-right: 70px;
}

.task-reward {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

.tasks-header {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tasks-header i {
    color: var(--accent-teal);
}

/* Completed task styling */
.task-item.completed {
    opacity: 0.7;
    border-color: rgba(39, 174, 96, 0.5);
}

.task-item.completed .task-reward img.token-icon {
    display: none;
}

.task-item.completed .task-reward::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 1.5rem;
    color: #27ae60;
    margin-right: 8px;
}

/* Earned but unclaimed task */
.task-item.earned {
    border-color: rgba(46, 204, 113, 0.7);
    background: rgba(39, 174, 96, 0.12);
    animation: earnedPulse 2s ease-in-out infinite;
}

@keyframes earnedPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
    50%       { box-shadow: 0 0 8px 2px rgba(46, 204, 113, 0.35); }
}

.task-item.earned .task-status {
    display: flex !important;
    width: auto;
    height: auto;
    background: none;
    border: none;
}

.token-balance {
    /* Pill shape */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10.8px 21.6px;
    border-radius: 9999px;
    background-color: #0f1f34;
    /* Inset 3D effect */
    box-shadow:
        inset 0 4px 8px rgba(0, 0, 0, 0.5),
        inset 0 -2px 4px rgba(255, 255, 255, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(53, 176, 178, 0.2);
    /* Text styling */
    color: #FEFEFE;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.5px;
    line-height: 1;
    gap: 12px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.token-balance::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(53, 176, 178, 0.1) 0%, transparent 50%);
    pointer-events: none;
    border-radius: inherit;
}

.token-balance:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 4px 8px rgba(0, 0, 0, 0.6),
        inset 0 -2px 4px rgba(255, 255, 255, 0.15),
        0 6px 16px rgba(0, 0, 0, 0.4);
    background-color: #0f243d;
}

.token-balance .token-icon {
    width: 28.8px;
    height: 28.8px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.token-balance #tokenText,
.token-balance #tokensAmount,
.token-balance #coinsCounter {
    color: #FEFEFE;
    font-weight: 700;
    font-size: 1.35rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.game-pot-label span:first-child {
    font-size: 0.9rem;
    opacity: 0.8;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .token-balance,
    .username-btn {
        padding: 7.2px 14.4px;
        font-size: 1.026rem;
        gap: 8px;
    }
    .token-balance .token-icon,
    .username-btn .token-icon,
    #rankIcon img {
        width: 25.2px;
        height: 25.2px;
    }
    .token-balance #tokenText,
    .token-balance #tokensAmount,
    .token-balance #coinsCounter,
    .username-btn #usernameText {
        font-size: 1.026rem;
    }
    .rating-badge {
        padding: 4px 22px;
        font-size: 1rem;
        gap: 6px;
        flex: 0 0 auto;
        width: fit-content;
    }
    .rating-badge .rating-label {
        font-size: 0.5rem;
    }
    .rating-badge .rating-number {
        font-size: 1.2rem;
    }
}

/* Rating Badge - compact pill */
.rating-badge {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 6px 28px;
    border-radius: 9999px;
    background-color: #0f1f34;
    border: 1px solid rgba(53, 176, 178, 0.5);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        0 0 8px rgba(53, 176, 178, 0.3);
    color: #ffffff;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    line-height: 1;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    min-width: 95px;
    height: auto;
    gap: 8px;
    flex: 0 0 auto;
    width: fit-content;
}

.rating-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(53, 176, 178, 0.1) 0%, transparent 50%);
    pointer-events: none;
    border-radius: inherit;
}

.rating-badge .rating-label {
    font-size: 0.65rem;
    color: #35b0b2;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
    transform: rotate(-90deg);
    transform-origin: center;
    white-space: nowrap;
}

.rating-badge .rating-number {
    font-size: 1.3rem;
    color: #ffffff;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Optional hover effect */
.rating-badge:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 12px rgba(53, 176, 178, 0.5);
    background-color: #0f243d;
}

/* Wider right-side panels */
.time-control-info,
.right-side-content,
.game-result,
.game-export,
.game-controls-panel {
    width: calc(260px + 2cm) !important;
}
