* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #2a1810, #3d2817, #1a2f1a);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Login Screen Styles */
.login-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ffd23f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
    animation: gentle-glow 3s ease-in-out infinite alternate;
}

.logo .tagline {
    font-size: 1.1rem;
    color: #ffd23f;
    margin-bottom: 10px;
    font-weight: 300;
}

.logo .welcome-text {
    font-size: 0.9rem;
    color: #cccccc;
    margin-bottom: 40px;
    font-weight: 300;
    font-style: italic;
}

.login-form {
    background: rgba(58, 40, 23, 0.9);
    border: 2px solid #ff6b35;
    border-radius: 20px;
    padding: 35px;
    backdrop-filter: blur(15px);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
}

.login-form::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes gentle-glow {
    0% { text-shadow: 0 0 20px rgba(255, 107, 53, 0.4), 0 0 30px rgba(255, 107, 53, 0.2); }
    100% { text-shadow: 0 0 30px rgba(255, 107, 53, 0.6), 0 0 40px rgba(255, 107, 53, 0.3); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.input-group {
    margin-bottom: 25px;
    text-align: left;
}

.input-group label {
    display: block;
    color: #ffd23f;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #8b4513;
    border-radius: 12px;
    background: rgba(26, 29, 46, 0.6);
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.4);
    background: rgba(26, 29, 46, 0.8);
}

.login-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ffd23f);
    border: none;
    border-radius: 25px;
    color: #000;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.5);
}

.sa-badge {
    margin-top: 30px;
    padding: 12px 20px;
    background: linear-gradient(45deg, rgba(255, 107, 53, 0.2), rgba(247, 147, 30, 0.2));
    border-radius: 25px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 107, 53, 0.3);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
}

/* Dashboard Styles */
.dashboard-header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
    max-width: 600px;
}

.dashboard-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b35, #ffd23f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.main-tagline {
    font-size: 1.1rem;
    color: #ffd23f;
    margin-bottom: 10px;
    font-weight: 300;
}

.sub-tagline {
    font-size: 1rem;
    color: #e6c235;
    margin-bottom: 20px;
    font-weight: 300;
    font-style: italic;
}

.dashboard-main {
    flex: 1;
    width: 100%;
    max-width: 600px;
}

.games-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
}

.game-tile {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tournament-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    z-index: 1;
}

.tournament-status-badge.enabled {
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tournament-status-badge.disabled {
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tournament-status-badge.checking {
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.4);
    border-color: #ffd23f;
}

.leaderboard-section {
    background: rgba(58, 40, 23, 0.7);
    border: 2px solid #ffd23f;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    margin-top: 30px;
    box-shadow: 0 8px 25px rgba(255, 210, 63, 0.2);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.section-header h3 {
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: 600;
}

.section-header .game-icon {
    font-size: 2rem;
    margin: 0;
    filter: drop-shadow(0 0 10px rgba(255, 210, 63, 0.5));
}

.coming-soon {
    color: #ffd23f;
    font-size: 1rem;
    font-style: italic;
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.5));
}

.game-tile h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: 600;
}

.game-tile p {
    color: #ffd23f;
    font-size: 0.9rem;
}

.game-tile.coming-soon {
    background: rgba(58, 40, 23, 0.5);
    border-color: rgba(255, 107, 53, 0.3);
    opacity: 0.7;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.game-tile.coming-soon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 210, 63, 0.1), transparent);
    animation: shimmer 2s infinite;
}

.game-tile.coming-soon:hover {
    transform: none;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.1);
    border-color: rgba(255, 210, 63, 0.4);
}

.game-tile.coming-soon h3 {
    color: rgba(255, 255, 255, 0.6);
}

.game-tile.coming-soon p {
    color: rgba(255, 210, 63, 0.6);
}

.game-tile.coming-soon .game-icon {
    filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.2));
    opacity: 0.6;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.dashboard-footer {
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-footer p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-style: italic;
}

.footer-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.account-btn {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.account-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.logout-btn {
    background: linear-gradient(45deg, #ff4444, #cc3333);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.3);
}

@media (max-width: 480px) {
    .footer-actions {
        flex-direction: column;
        gap: 10px;
    }

    .account-btn, .logout-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Dashboard Header Styles */
.skillzone-banner {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px 0;
}

.skillzone-logo {
    font-size: 3.5rem;
    font-weight: 900;
    color: #d8d0ff;
    margin-bottom: 8px;
    text-shadow: 0 0 3px rgba(216, 208, 255, 0.2);
    letter-spacing: 1px;
}

.skillzone-subtitle {
    font-size: 1rem;
    color: #d8d0ff;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 10px;
    opacity: 0.9;
    text-shadow: 0 0 2px rgba(216, 208, 255, 0.2);
}

.skillzone-tagline {
    font-size: 0.95rem;
    color: #d8d0ff;
    font-weight: 300;
    margin-bottom: 0;
    opacity: 0.85;
    text-shadow: 0 0 1px rgba(216, 208, 255, 0.1);
}

.tagline-emphasis {
    font-style: italic;
    font-weight: 400;
}

.dashboard-header {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
    max-width: 1200px;
}

.user-info-section {
    position: absolute;
    top: -20px;
    right: 0;
    z-index: 10;
}

.user-info-table {
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome-section {
    width: 100%;
    padding-top: 60px;
}

.user-stats {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 6px;
    border-collapse: separate;
    border-spacing: 0;
}

.user-stats td {
    padding: 2px 6px;
    font-size: 0.75rem;
}

.stat-label {
    color: #aaa;
    font-weight: 500;
    text-align: right;
    padding-right: 10px;
}

.stat-value {
    color: #fff;
    font-weight: 600;
}

.wallet-balance {
    color: #87ceeb;
    font-weight: 700;
}

.header-account-btn {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.header-account-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

@media (max-width: 768px) {
    .user-info-section {
        position: static;
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }

    .user-info-table {
        justify-content: center;
    }

    .welcome-section {
        padding-top: 0;
    }

    .user-stats {
        font-size: 0.8rem;
        padding: 8px;
    }

    .user-stats td {
        padding: 2px 6px;
    }

    .header-account-btn {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .user-info-table {
        flex-direction: column;
        gap: 10px;
    }

    .user-stats {
        font-size: 0.75rem;
    }
}

/* Game Placeholder Styles */
.game-placeholder {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.back-btn {
    align-self: flex-start;
    padding: 10px 20px;
    background: rgba(58, 40, 23, 0.9);
    border: 1px solid #ff6b35;
    border-radius: 8px;
    color: #ff6b35;
    cursor: pointer;
    margin-bottom: 30px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #ff6b35;
    color: #000;
}

.placeholder-content h2 {
    font-size: 2rem;
    color: #ff6b35;
    margin-bottom: 20px;
}

.game-description {
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 20px 0;
}

.skills-section {
    margin: 25px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.skills-section h3 {
    color: #ffd23f;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: #ff6b35;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.game-modes {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-btn {
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.mode-btn:hover {
    transform: translateY(-2px);
}

.free-play-btn {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: white;
}

.tournament-btn {
    background: linear-gradient(135deg, #ffd23f, #ff6b35);
    color: #333;
    text-align: center;
}

.tournament-btn small {
    font-size: 0.8rem;
    opacity: 0.9;
}

.recommendation {
    background: rgba(255, 210, 63, 0.1);
    border: 2px solid #ffd23f;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    color: #ffffff;
}

.recommendation p {
    margin: 0;
}

.placeholder-icon {
    font-size: 4rem;
    margin: 30px 0;
    filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.5));
}

.placeholder-content p {
    font-size: 1.1rem;
    color: #cccccc;
    margin-bottom: 30px;
}

.sa-colors-bar {
    height: 5px;
    background: linear-gradient(90deg, #ff0000, #00ff00, #0000ff, #ffff00, #000000, #ffffff);
    border-radius: 3px;
    margin: 20px auto;
    width: 200px;
}

/* Game Description Styles */
.game-description {
    font-size: 1.1rem;
    color: #cccccc;
    margin: 20px 0;
    line-height: 1.5;
}

.skills-section {
    margin: 25px 0;
}

.skills-section h3 {
    color: #ffd23f;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.skill-tag {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.game-modes {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.game-tile {
    background: rgba(58, 40, 23, 0.9);
    border: 2px solid #ff6b35;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.2);
    position: relative; /* Add this to contain the absolute positioned banner */
}

.dev-banner {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(45deg, #ff6b35, #ffd23f);
    color: #333;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.mode-btn {
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.free-play-btn {
    background: linear-gradient(45deg, #32CD32, #228B22);
    color: white;
    border: 2px solid #228B22;
}

.free-play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(50, 205, 50, 0.4);
}

.tournament-btn {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    border: 2px solid #ff6b35;
}

.tournament-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.recommendation {
    background: rgba(255, 210, 63, 0.1);
    border: 1px solid rgba(255, 210, 63, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
}

.recommendation p {
    color: #ffd23f;
    margin: 0;
    font-size: 0.9rem;
}

.leaderboards-btn {
    background: linear-gradient(135deg, #ffd23f, #ff6b35);
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    max-width: 200px;
    width: 100%;
}

.leaderboards-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 210, 63, 0.4);
}

/* Mobile-first responsive adjustments */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 2.5rem;
    }

    .skillzone-logo {
        font-size: 2.8rem;
        letter-spacing: 0.5px;
    }

    .skillzone-subtitle {
        font-size: 0.9rem;
    }

    .skillzone-tagline {
        font-size: 0.85rem;
    }

    .dashboard-header h2 {
        font-size: 1.5rem;
    }

    .skillzone-banner {
        padding: 15px 0;
        margin-bottom: 20px;
    }

    .game-tile {
        padding: 20px;
    }

    .game-icon {
        font-size: 2.5rem;
    }

    .game-tile h3 {
        font-size: 1.1rem;
    }
}

@media (min-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }

    .screen {
        padding: 40px;
    }
}