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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 3rem;
    color: #333;
    margin-bottom: 5px;
}

.subtitle {
    color: #666;
    font-size: 1.2rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
}

.header-content h1 {
    flex: 1 1 auto;
    text-align: center;
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-content .current-level {
    white-space: nowrap;
}

/* Gear menu styles */
.gear-menu {
    position: relative;
}

.gear-button {
    font-size: 1.5rem;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    display: inline-block;
    background: transparent;
    border: none;
    cursor: pointer;
}

.gear-button:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.gear-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 150px;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 15px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
    border-radius: 8px;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown-item:only-child {
    border-radius: 8px;
}

.back-button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
    display: inline-block;
}

.back-button:hover {
    background: #5568d3;
}

.home-button {
    font-size: 1.5rem;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    display: inline-block;
    background: transparent;
}

.home-button:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.game-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.game-card.coming-soon {
    background: linear-gradient(135deg, #ccc 0%, #999 100%);
    cursor: default;
}

.game-card.coming-soon:hover {
    transform: none;
}

.game-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
}

.game-icon svg {
    display: block;
}

.game-card h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.game-card p {
    font-size: 1rem;
    opacity: 0.9;
}



.btn {
    padding: 9px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-info {
    background: #48bb78;
    color: white;
}

.btn-info:hover {
    background: #38a169;
}

.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.status-message.success {
    background: #c6f6d5;
    color: #22543d;
    display: block;
}

.status-message.error {
    background: #fed7d7;
    color: #742a2a;
    display: block;
}

.status-message.info {
    background: #bee3f8;
    color: #2c5282;
    display: block;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
        border-radius: 10px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .header-content h1 {
        font-size: 1.5rem;
    }

    .header-content h1 svg {
        width: 40px;
        height: 40px;
        margin-right: 5px;
    }

    .header-left {
        flex-direction: row !important;
    }

    .back-button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .help-button-header {
        padding: 5px 12px !important;
        font-size: 0.85rem !important;
    }

    .game-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}
