/* Modern Play Page Styles */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --lighter-bg: #ffffff;
    --dark-text: #1e293b;
    --medium-text: #475569;
    --light-text: #64748b;
    --border-color: #e2e8f0;
    --navbar-height: 50px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
}

.game-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flipIn {
    0% { transform: rotateX(0); }
    50% { transform: rotateX(-90deg); }
    100% { transform: rotateX(0); }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -10px, 0);
    }
    70% {
        transform: translate3d(0, -5px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Layout */
.game-area {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(135deg, var(--lighter-bg) 0%, #f1f5f9 100%);
    border-left: 1px solid var(--border-color);
    padding: 2rem;
    min-height: 100vh;
    padding-top: var(--navbar-height);
}

/* Start Section */
.start-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.welcome-card {
    background: var(--lighter-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--success-color));
}

.welcome-header {
    margin-bottom: 2.5rem;
}

.game-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    animation: pulse 2s infinite;
}

.welcome-game-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.15));
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1.5rem;
    margin: 0 auto 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    animation: fadeInUp 0.5s ease-out;
    max-width: 100%;
}

.welcome-game-name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

.welcome-game-name i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.welcome-subtitle {
    color: var(--medium-text);
    font-size: 1.1rem;
    margin: 0;
}

.player-form {
    margin-bottom: 2rem;
}

.error-message-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 1px solid #ef4444;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    margin-top: 0.75rem;
    font-size: 0.9rem;
    animation: fadeInUp 0.3s ease-out;
}

.error-message-modern i {
    color: #ef4444;
    font-size: 1.1rem;
}

.input-group-modern {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.input-group-modern:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
    padding: 0 0.75rem;
}

.form-control-modern {
    border: none;
    outline: none;
    flex: 1;
    padding: 0.75rem;
    font-size: 1rem;
    background: transparent;
    color: var(--dark-text);
}

.form-control-modern::placeholder {
    color: var(--light-text);
}

.btn-start-game {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-start-game:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.share-section {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.btn-share {
    background: var(--light-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-share:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-share-success {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
    animation: bounce 0.6s ease-out;
}

/* Game Section */
.game-section {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    padding-top: 80px;
}

.game-header {
    margin-bottom: 1rem;
}

.game-title-header {
    background: linear-gradient(135deg, var(--lighter-bg), #f1f5f9);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-color);
    animation: fadeInUp 0.6s ease-out;
}

.game-title-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.game-title-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.player-info-modern {
    background: var(--lighter-bg);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.player-stats {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--light-text);
    font-weight: 500;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-text);
}

/* Game Board */
.game-board {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.wordle-grid-modern {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0.25rem;
}

.wordle-row {
    display: grid;
    gap: 8px;
    justify-content: center;
    width: min(100%, calc(var(--columns, 5) * 65px + (var(--columns, 5) - 1) * 8px));
}

.wordle-cell {
    width: 65px;
    height: 65px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--lighter-bg);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.wordle-cell.correct {
    background: linear-gradient(135deg, var(--success-color), #059669);
    border-color: var(--success-color);
    color: white;
    animation: flipIn 0.6s ease-out;
    box-shadow: var(--shadow);
}

.wordle-cell.present {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    border-color: var(--warning-color);
    color: white;
    animation: flipIn 0.6s ease-out;
    box-shadow: var(--shadow);
}

.wordle-cell.absent {
    background: linear-gradient(135deg, var(--medium-text), #374151);
    border-color: var(--medium-text);
    color: white;
    animation: flipIn 0.6s ease-out;
    box-shadow: var(--shadow);
}

.wordle-cell.active {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Status */
.status-modern {
    text-align: center;
    margin: 0;
}

.status-message {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    animation: fadeInUp 0.5s ease-out;
}

.success-message {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #10b981;
}

.error-message {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 1px solid #ef4444;
}

.game-over-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.5rem auto;
    max-width: 400px;
}

.btn-action {
    padding: 5px 5px;
    font-size: 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease-in-out;
  }
  
  .btn-primary-action {
    background-color: #007bff;
    color: white;
    border: none;
  }
  
  .btn-secondary-action {
    background-color: #6c757d;
    color: white;
    border: none;
  }
  
  .btn-action:hover {
    opacity: 0.9;
    transform: scale(1.03);
  }
  

/* Keyboard */
.keyboard-modern {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 500px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.key-modern {
    min-width: 40px;
    height: 50px;
    border-radius: var(--border-radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--lighter-bg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    color: var(--dark-text);
}

.key-modern:hover {
    background: var(--light-bg);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.key-modern:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.key-modern.key-wide {
    min-width: 60px;
    font-size: 0.8rem;
    gap: 0.25rem;
}

.key-modern.correct {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    border-color: var(--success-color);
}

.key-modern.present {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
    border-color: var(--warning-color);
}

.key-modern.absent {
    background: linear-gradient(135deg, var(--medium-text), #374151);
    color: white;
    border-color: var(--medium-text);
}

/* Sidebar */
.sidebar-content {
    position: sticky;
    top: 2rem;
}

.sidebar-header {
    margin-top: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.sidebar-title i {
    color: var(--warning-color);
}

.btn-refresh {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
}

.btn-refresh:hover {
    color: var(--primary-dark);
    transform: rotate(180deg);
}

.btn-refresh:active {
    transform: rotate(360deg);
}

.sidebar-subtitle {
    color: var(--medium-text);
    margin: 0;
}

.leaderboard {
    background: var(--lighter-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Quick Feedback Form */
.quick-feedback-container {
    margin-top: 0.75rem;
}

.quick-feedback-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.quick-feedback-input {
    flex: 1;
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: var(--lighter-bg);
    color: var(--dark-text);
    transition: all 0.3s ease;
    outline: none;
}

.quick-feedback-input::placeholder {
    color: var(--light-text);
}

.quick-feedback-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.quick-feedback-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.quick-feedback-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow);
}

.quick-feedback-btn:active {
    transform: translateY(0) scale(0.95);
}

.quick-feedback-status {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    text-align: center;
    min-height: 18px;
}

.quick-feedback-status.success {
    color: var(--success-color);
    animation: fadeInUp 0.3s ease-out;
}

.quick-feedback-status.error {
    color: var(--danger-color);
    animation: fadeInUp 0.3s ease-out;
}

/* Compact Stats Summary for Welcome and Game Screens */
.stats-summary-container {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease-out;
}

.game-stats-summary {
    margin-top: 1.5rem;
}

.stats-summary-compact {
    background: var(--lighter-bg);
    border-radius: var(--border-radius-sm);
    padding: 0.6rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.game-stats-summary .stats-summary-compact {
    background: linear-gradient(135deg, var(--lighter-bg), #f8fafc);
}

.stats-row-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

.stat-box-compact {
    background: var(--light-bg);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1.5px solid var(--border-color);
    transition: all 0.2s ease;
    flex: 0 1 auto;
    min-width: fit-content;
}

.stat-box-compact:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.stat-box-compact.success-stat {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03), rgba(16, 185, 129, 0.08));
}

.stat-box-compact.fail-stat {
    border-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.03), rgba(239, 68, 68, 0.08));
}

.stat-box-compact.playing-stat {
    border-color: var(--warning-color);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.03), rgba(245, 158, 11, 0.08));
}

.stat-box-compact.avg-stat {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), rgba(37, 99, 235, 0.08));
}

.stat-icon-compact {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.stat-box-compact .stat-icon-compact {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.stat-box-compact.success-stat .stat-icon-compact {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.stat-box-compact.fail-stat .stat-icon-compact {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

.stat-box-compact.playing-stat .stat-icon-compact {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
}

.stat-box-compact.avg-stat .stat-icon-compact {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.stat-details-compact {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stat-number-compact {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark-text);
    line-height: 1;
}

.stat-label-compact {
    font-size: 0.7rem;
    color: var(--medium-text);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}


.table-container {
    max-height: 60vh;
    overflow-y: auto;
}

.leaderboard-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.leaderboard-table th {
    background: linear-gradient(135deg, var(--light-bg), #f1f5f9);
    color: var(--dark-text);
    font-weight: 600;
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.leaderboard-table th i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.leaderboard-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--dark-text);
    font-size: 0.9rem;
}

.leaderboard-table tbody tr:hover {
    background: var(--light-bg);
}

.leaderboard-table tbody tr:nth-child(odd) {
    background: rgba(248, 250, 252, 0.5);
}

/* Success/Fail indicators */
.leaderboard-table td:nth-child(2) {
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        border-left: none;
        border-top: 1px solid var(--border-color);
        min-height: auto;
        padding: 1.5rem;
    }
    
    .game-area {
        padding: 1.5rem;
    }
    
    .sidebar-content {
        position: static;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: var(--navbar-height);
        padding: 0.5rem 0;
    }
    
    .navbar .container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .navbar-brand {
        font-size: 0.95rem;
        flex-shrink: 0;
    }
    
    .brand-icon {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
    
    .navbar-nav {
        gap: 0.2rem;
        flex-wrap: nowrap;
        display: flex;
        flex-direction: row;
    }
    
    .nav-item {
        flex-shrink: 0;
    }
    
    .feedback-nav-btn {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.8rem;
    }
    
    .feedback-nav-btn i {
        font-size: 0.9rem;
    }
    
    .share-nav-btn {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.8rem;
    }
    
    .share-nav-btn i {
        font-size: 0.9rem;
    }
    
    .nav-item.dropdown {
        position: relative;
    }
    
    .more-games-btn {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.8rem;
    }
    
    .more-games-btn i {
        font-size: 0.9rem;
    }
    
    .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
    }
    
    .share-dropdown {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
    }
    
    .dropdown-menu {
        min-width: 200px;
        font-size: 0.95rem;
    }
    
    .dropdown-item {
        padding: 0.65rem 0.85rem;
        font-size: 0.95rem;
    }
    
    .game-area {
        padding: 1rem;
    }
    
    .game-section {
        padding-top: 70px;
    }
    
    .sidebar {
        padding: 1rem;
    }
    
    .welcome-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .game-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .stats-summary-container {
        margin-bottom: 1.25rem;
    }
    
    .welcome-game-name {
        font-size: 1.1rem;
        padding: 0.6rem 1.2rem;
        gap: 0.6rem;
    }
    
    .welcome-game-name span {
        max-width: 300px;
    }
    
    .welcome-game-name i {
        font-size: 1.2rem;
    }
    
    .input-group-modern {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .btn-start-game {
        width: 100%;
        justify-content: center;
    }
    
    .player-stats {
        flex-direction: row;
        gap: 0.5rem;
    }

    .stat-item {
        flex: 1;
    }
    
    .wordle-cell {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .wordle-row {
        gap: 6px;
        width: min(100%, calc(var(--columns, 5) * 50px + (var(--columns, 5) - 1) * 6px));
    }
    
    .key-modern {
        min-width: 35px;
        height: 45px;
        font-size: 0.8rem;
    }
    
    .key-modern.key-wide {
        min-width: 50px;
        font-size: 0.7rem;
    }
    
    .keyboard-row {
        gap: 4px;
    }
    
    .game-over-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-action {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .stats-summary-compact {
        padding: 0.5rem;
    }
    
    .stats-row-compact {
        gap: 0.3rem;
    }
    
    .stat-box-compact {
        padding: 0.35rem 0.5rem;
    }
    
    .stat-icon-compact {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .stat-number-compact {
        font-size: 0.9rem;
    }
    
    .stat-label-compact {
        font-size: 0.65rem;
    }
    
    .quick-feedback-input {
        font-size: 0.8rem;
        padding: 0.45rem 0.9rem;
    }
    
    .quick-feedback-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    .game-title-header {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    
    .game-title-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .game-title-text {
        font-size: 1.2rem;
        max-width: 400px;
    }
}

@media (max-width: 576px) {
    .navbar .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .navbar-brand {
        font-size: 0.85rem;
    }
    
    .brand-icon {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
    }
    
    .navbar-nav {
        gap: 0.15rem;
    }
    
    .feedback-nav-btn {
        padding: 0.25rem 0.4rem !important;
        font-size: 0.75rem;
    }
    
    .feedback-nav-btn span {
        display: none;
    }
    
    .feedback-nav-btn i {
        font-size: 0.85rem;
    }
    
    .share-nav-btn {
        padding: 0.25rem 0.4rem !important;
        font-size: 0.75rem;
    }
    
    .share-nav-btn span {
        display: none;
    }
    
    .share-nav-btn i {
        font-size: 0.85rem;
    }
    
    .more-games-btn {
        padding: 0.25rem 0.4rem !important;
        font-size: 0.75rem;
    }
    
    .more-games-btn span {
        display: none;
    }
    
    .more-games-btn i {
        font-size: 0.85rem;
    }
    
    .nav-item.dropdown {
        position: relative;
    }
    
    .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        min-width: 180px;
        font-size: 0.9rem;
    }
    
    .share-dropdown {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
    }
    
    .dropdown-item {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
        gap: 0.6rem;
    }
    
    .navbar-nav {
        gap: 0.25rem;
        flex-wrap: nowrap;
    }
    
    .nav-item.dropdown {
        position: relative;
    }
    
    .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        min-width: 180px;
        font-size: 0.9rem;
    }
    
    .share-dropdown {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
    }
    
    .dropdown-item {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
        gap: 0.6rem;
    }
    
    .welcome-card {
        margin: 0.5rem;
        padding: 1.5rem;
    }
    
    .welcome-title {
        font-size: 1.8rem;
    }
    
    .stats-summary-container {
        margin-bottom: 1rem;
    }
    
    .welcome-game-name {
        font-size: 1rem;
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }
    
    .welcome-game-name span {
        max-width: 200px;
    }
    
    .welcome-game-name i {
        font-size: 1.1rem;
    }
    
    .sidebar-title {
        font-size: 1.3rem;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
    }
    
    .table-container {
        max-height: 50vh;
    }
    
    .game-section {
        padding-top: 75px;
    }
    
    .game-header {
        margin-top: 0;
    }
    
    .game-stats-summary {
        margin-top: 0.75rem;
    }
    
    .stats-summary-compact {
        padding: 0.4rem;
    }
    
    .stats-row-compact {
        gap: 0.25rem;
    }
    
    .stat-box-compact {
        padding: 0.3rem 0.4rem;
        gap: 0.3rem;
    }
    
    .stat-icon-compact {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
    
    .stat-number-compact {
        font-size: 0.85rem;
    }
    
    .stat-label-compact {
        font-size: 0.6rem;
    }
    
    .quick-feedback-input {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .quick-feedback-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .quick-feedback-status {
        font-size: 0.7rem;
    }
    
    .game-title-header {
        padding: 0.6rem 0.75rem;
        gap: 0.6rem;
    }
    
    .game-title-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .game-title-text {
        font-size: 1.1rem;
        max-width: 250px;
    }
}

/* Custom scrollbar for leaderboard */
.table-container::-webkit-scrollbar {
    width: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--light-text);
}

/* Feedback Modal */
#feedbackModal .modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-xl);
}

#feedbackModal .modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

#feedbackModal .modal-title {
    color: var(--dark-text);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#feedbackModal .modal-title i {
    color: var(--primary-color);
}

#feedbackModal .modal-body {
    padding: 1.5rem;
}

#feedbackModal .form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#feedbackModal .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

#feedbackModal .modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

#feedbackModal .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
}

#feedbackModal .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

#feedbackModal .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

#feedbackModal small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

#feedbackModal .alert {
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    margin: 0;
}

/* Share Toast Notification */
.share-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.share-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.share-toast i {
    font-size: 1.2rem;
}

/* Navbar Styles */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem 0;
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--navbar-height);
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    flex-wrap: nowrap !important;
}

.navbar.hidden {
    transform: translateY(-100%);
}

.navbar-brand {
    color: var(--primary-color) !important;

    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: 1;
    height: var(--navbar-height);
    padding: 0;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.brand-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

/* More Games Dropdown */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.nav-item {
    flex-shrink: 0;
}

.nav-item.dropdown {
    position: relative;
}

.feedback-nav-btn {
    color: var(--primary-color) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.feedback-nav-btn:hover,
.feedback-nav-btn:focus {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-dark) !important;
}

.feedback-nav-btn i {
    font-size: 1.1rem;
}

.share-nav-btn {
    color: var(--primary-color) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

.share-nav-btn:hover,
.share-nav-btn:focus {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-dark) !important;
}

.share-nav-btn i {
    font-size: 1.1rem;
}

.share-dropdown {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    min-width: 180px;
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
    z-index: 1050;
}

.share-dropdown .dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--dark-text);
    font-weight: 500;
    cursor: pointer;
}

.share-dropdown .dropdown-item:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.1));
    color: var(--primary-color);
    transform: translateX(5px);
}

.share-dropdown .dropdown-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.share-dropdown .dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--border-color);
}

.more-games-btn {
    color: var(--primary-color) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border: 2px solid transparent;
}

.more-games-btn:hover,
.more-games-btn:focus {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-dark) !important;
}

.more-games-btn i {
    font-size: 1.1rem;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    margin-top: 0.5rem;
    min-width: 220px;
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
    z-index: 1050;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--dark-text);
    font-weight: 500;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.1));
    color: var(--primary-color);
    transform: translateX(5px);
}

.dropdown-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}