/* games.css - Typing Games Page Styles */

/* ================= CSS VARIABLES ================= */
:root {
    /* Light Theme */
    --bg-primary: #f5f8ff;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-main: #ffffff;
    --bg-right: #ffffff;
    
    --text-primary: #1e2b3c;
    --text-secondary: #3a4b62;
    --text-muted: #6b7a8f;
    --text-inverse: #ffffff;
    
    --border-color: #d9e2ef;
    --border-strong: #a0b8d4;
    --border-focus: #2b6ed9;
    
    --accent-primary: #2b6ed9;
    --accent-secondary: #1e4b8c;
    --accent-light: #e8f0fe;
    --accent-hover: #4895ef;
    --accent-transparent: rgba(43, 110, 217, 0.1);
    --accent-success: #28a745;
    --accent-warning: #ffc107;
    --accent-danger: #dc3545;
    --accent-info: #17a2b8;
    
    --shadow-color: rgba(0, 40, 100, 0.08);
    --shadow-hover: rgba(43, 110, 217, 0.15);
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    
    /* Game difficulty colors */
    --easy: #28a745;
    --medium: #ffc107;
    --hard: #dc3545;
    
    --transition-speed: 0.3s;
}

/* ================= DARK THEME ================= */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-sidebar: #1e293b;
    --bg-main: #1e293b;
    --bg-right: #1e293b;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;
    
    --border-color: #334155;
    --border-strong: #475569;
    --border-focus: #3b82f6;
    
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-light: #1e293b;
    --accent-hover: #2563eb;
    --accent-transparent: rgba(59, 130, 246, 0.15);
    --accent-success: #4ade80;
    --accent-warning: #fbbf24;
    --accent-danger: #f87171;
    --accent-info: #38bdf8;
    
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(59, 130, 246, 0.2);
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ================= BASE ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    transition: background-color var(--transition-speed) ease, 
                color var(--transition-speed) ease;
}

/* ================= DARK MODE TOGGLE ================= */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-strong);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-btn:hover {
    transform: scale(1.05);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

/* ================= MAIN LAYOUT ================= */
.games-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    overflow-x: hidden;
}

.games-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0 20px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 25px;
}

.site-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
    transition: color var(--transition-speed) ease;
}

.site-title:hover {
    color: var(--accent-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.login-btn {
    background: transparent;
    border: 2px solid var(--border-strong);
    color: var(--text-primary);
    padding: 8px 28px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    white-space: nowrap;
    font-size: 14px;
}

.login-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.mobile-menu-btn {
    display: none;
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    order: 1;
}

/* ================= 3-COLUMN LAYOUT ================= */
.games-layout {
    display: grid;
    grid-template-columns: 260px 1fr 280px;
    gap: 25px;
    margin-bottom: 40px;
}

/* ================= LEFT SIDEBAR ================= */
.games-sidebar {
    background: var(--bg-sidebar);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    padding: 20px 15px;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--card-shadow);
}

.games-sidebar:hover {
    border-color: var(--accent-primary);
    transform: scale(1.02);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.nav-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Navigation */
.games-nav ul {
    list-style: none;
}

.games-nav li {
    margin-bottom: 5px;
}

.games-nav a {
    display: block;
    padding: 12px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.games-nav li.active a {
    background: var(--accent-transparent);
    color: var(--accent-primary);
    font-weight: 600;
    border-left: 3px solid var(--accent-primary);
}

.games-nav a:hover {
    background: var(--accent-light);
    color: var(--accent-primary);
    transform: translateX(5px);
}

.home-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-icon {
    font-size: 1.1rem;
}

/* Player Stats */
.player-stats {
    background: var(--bg-secondary);
    border-radius: 18px;
    padding: 20px;
    margin: 25px 0;
    border: 1px solid var(--border-color);
}

.player-stats h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 600;
    color: var(--accent-primary);
}

/* Daily Reward */
.daily-reward {
    background: linear-gradient(135deg, var(--accent-light), var(--bg-secondary));
    border-radius: 18px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.daily-reward h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.reward-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 15px;
    border: 1px solid var(--border-color);
}

.reward-icon {
    font-size: 2.5rem;
}

.reward-info {
    flex: 1;
}

.reward-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.reward-value {
    display: block;
    font-weight: 600;
    color: var(--accent-primary);
}

.claim-btn {
    background: var(--accent-success);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.claim-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px var(--shadow-hover);
}

.claim-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ================= MAIN CONTENT ================= */
.games-main {
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    padding: 25px;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--card-shadow);
}

.games-main:hover {
    border-color: var(--accent-primary);
    transform: scale(1.01);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.games-header-section h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.games-subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.game-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 25px 20px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 15px 30px var(--shadow-hover);
}

.game-card.featured {
    border-color: var(--accent-warning);
    background: linear-gradient(135deg, var(--bg-secondary), var(--accent-light));
}

.game-card.featured::before {
    content: '⭐';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
}

.game-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.game-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    text-align: center;
}

.game-card h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.game-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
    flex: 1;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.game-difficulty {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    width: fit-content;
}

.game-difficulty.easy {
    background: var(--easy);
    color: white;
}

.game-difficulty.medium {
    background: var(--medium);
    color: var(--text-primary);
}

.game-difficulty.hard {
    background: var(--hard);
    color: white;
}

.play-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 12px 0;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    width: 100%;
    margin-top: auto;
}

.play-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
    box-shadow: 0 5px 15px var(--shadow-hover);
}

/* Game Categories */
.game-categories {
    margin-bottom: 40px;
}

.game-categories h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.category-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.category-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.category-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.category-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Leaderboard Preview */
.leaderboard-preview {
    margin-top: 40px;
}

.leaderboard-preview h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
}

.leaderboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 8px 25px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.tab-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.tab-btn:hover {
    border-color: var(--accent-primary);
}

.leaderboard-list {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-item:hover {
    background: var(--accent-light);
}

.leaderboard-rank {
    font-weight: 700;
    color: var(--accent-primary);
    width: 50px;
}

.leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: 600;
    color: var(--accent-primary);
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.leaderboard-game {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.leaderboard-score {
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 1.2rem;
}

/* ================= RIGHT SIDEBAR ================= */
.games-right {
    background: var(--bg-right);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    padding: 20px;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--card-shadow);
}

.games-right:hover {
    border-color: var(--accent-primary);
    transform: scale(1.02);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.featured-game, .achievements-preview, .friend-activity {
    background: var(--bg-secondary);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.featured-game h3, .achievements-preview h3, .friend-activity h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.featured-card {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 16px;
    padding: 20px;
    color: white;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-hover);
}

.featured-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.featured-card h4 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.featured-card p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.featured-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.play-featured {
    background: white;
    color: var(--accent-primary);
    border: none;
    padding: 10px 0;
    border-radius: 30px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.play-featured:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

.achievement-icon {
    font-size: 1.8rem;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.achievement-progress {
    font-size: 0.85rem;
    color: var(--accent-primary);
}

.view-all {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

.activity-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.friend-name {
    font-weight: 600;
    color: var(--accent-primary);
}

.friend-action {
    color: var(--text-secondary);
    margin: 0 5px;
}

.friend-time {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ================= GAME MODAL ================= */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 30px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    color: var(--text-primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition-speed) ease;
}

.close-modal:hover {
    color: var(--accent-danger);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

/* Game Container */
.game-container {
    text-align: center;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.game-stat {
    text-align: center;
}

.game-stat .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: block;
}

.game-stat .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.game-word {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 30px 0;
    font-family: 'Fira Code', monospace;
}

.game-input {
    width: 100%;
    padding: 15px;
    font-size: 1.5rem;
    border: 3px solid var(--border-color);
    border-radius: 60px;
    background: var(--bg-card);
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Fira Code', monospace;
}

.game-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.game-feedback {
    min-height: 40px;
    color: var(--text-muted);
}

/* ================= FOOTER ================= */
.test-footer {
    margin-top: 60px;
    padding: 0;
    border-top: 2px solid var(--border-color);
    width: 100%;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    padding: 40px 0;
    width: 100%;
}

/* LEFT SIDE: Logo + Copyright under logo */
.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-primary);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 14px;
}

/* CENTER: 2 rows with 4 buttons each */
.footer-center {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-width: 300px;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 15px 25px;
    justify-content: center;
}

.footer-links-grid a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.footer-links-grid a:hover {
    color: var(--accent-primary);
}

/* RIGHT SIDE: Independent platform text with email */
.footer-right {
    flex: 1;
    text-align: right;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    min-width: 220px;
}

.footer-right p {
    margin-bottom: 5px;
}

.footer-right a {
    color: var(--accent-primary);
    text-decoration: none;
}

.footer-right a:hover {
    text-decoration: underline;
}

/* ================= RESPONSIVE ================= */
@media screen and (max-width: 1200px) {
    .games-layout {
        grid-template-columns: 220px 1fr 240px;
        gap: 20px;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .games-layout {
        grid-template-columns: 1fr;
    }
    
    .games-sidebar, 
    .games-right {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .games-header {
        flex-wrap: nowrap;
        gap: 5px;
        padding: 10px 0;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .login-btn {
        padding: 6px 15px;
        font-size: 13px;
    }
    
    .mobile-menu-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-left, .footer-right {
        align-items: center;
        text-align: center;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, auto);
    }
}

@media screen and (max-width: 768px) {
    .games-main {
        padding: 20px;
    }
    
    .games-header-section h1 {
        font-size: 1.8rem;
    }
    
    .games-subtitle {
        font-size: 1rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .game-card {
        padding: 20px 15px;
    }
    
    .game-icon {
        font-size: 2.5rem;
    }
    
    .game-card h3 {
        font-size: 1.1rem;
    }
    
    .game-description {
        font-size: 0.85rem;
    }
    
    .game-meta {
        font-size: 0.8rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .category-card {
        padding: 12px 8px;
    }
    
    .category-icon {
        font-size: 1.5rem;
    }
    
    .category-name {
        font-size: 0.85rem;
    }
    
    .category-count {
        font-size: 0.7rem;
    }
    
    .leaderboard-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .tab-btn {
        width: 100%;
        padding: 8px;
    }
    
    .theme-toggle {
        bottom: 10px;
        right: 10px;
    }
    
    .theme-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
}

@media screen and (max-width: 480px) {
    .games-header {
        padding: 8px 0;
    }
    
    .site-title {
        font-size: 1.1rem;
    }
    
    .login-btn {
        padding: 4px 10px;
        font-size: 11px;
        border-width: 1.5px;
    }
    
    .mobile-menu-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .header-right {
        gap: 4px;
    }
    
    .games-main {
        padding: 15px;
    }
    
    .games-header-section h1 {
        font-size: 1.5rem;
    }
    
    .games-subtitle {
        font-size: 0.9rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-card {
        width: 100%;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-card {
        padding: 15px;
    }
    
    .featured-icon {
        font-size: 2rem;
    }
    
    .featured-card h4 {
        font-size: 1.1rem;
    }
    
    .achievement-item {
        padding: 8px;
    }
    
    .achievement-icon {
        font-size: 1.5rem;
    }
    
    .activity-item {
        padding: 8px 0;
    }
    
    .friend-name {
        font-size: 0.9rem;
    }
    
    .friend-action {
        font-size: 0.85rem;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .footer-links-grid a {
        font-size: 12px;
    }
    
    .footer-left, .footer-right {
        width: 100%;
    }
    
    .footer-copyright {
        font-size: 12px;
    }
    
    .footer-right p {
        font-size: 12px;
    }
}

@media screen and (max-width: 360px) {
    .site-title {
        font-size: 1rem;
    }
    
    .login-btn {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    .mobile-menu-btn {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .header-right {
        gap: 3px;
    }
    
    .games-header-section h1 {
        font-size: 1.3rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links-grid {
        grid-template-columns: 1fr;
    }
}

/* Landscape Mode */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .games-sidebar, .games-right {
        max-height: 400px;
        overflow-y: auto;
    }
    
    .theme-toggle {
        bottom: 5px;
        right: 5px;
    }
}