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

body {
    font-family: 'Orbitron', monospace;
    background: #d3d3d3;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background 0.5s ease;
}

/* Sport-specific color themes */
body.nba {
    background: #8b4513;
}

body.nhl {
    background: #f5f5dc;
}

body.nfl {
    background: #228b22;
}

body.soccer {
    background: #0066cc;
}

body.mixed {
    background: #87ceeb;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 20, 147, 0.3) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: -1;
}

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

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    animation: glow 2s ease-in-out infinite alternate;
    padding: 0 250px; /* Add padding to prevent overlap with user info */
}

@keyframes glow {
    from { text-shadow: 0 0 20px #fff, 0 0 30px #ff6b00, 0 0 40px #ff6b00; }
    to { text-shadow: 0 0 10px #fff, 0 0 20px #ff6b00, 0 0 30px #ff6b00; }
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.header p {
    font-size: 1.2rem;
    color: #ffd700;
    opacity: 0.9;
}

.game-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.game-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: shine 3s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Menu Page Styles */
.menu-page {
    display: block;
}

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

.sport-card {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.8), rgba(255, 140, 66, 0.8));
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

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

.sport-card:hover::before {
    left: 100%;
}

.sport-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.sport-emoji {
    font-size: 4rem;
    margin-bottom: 15px;
    display: block;
}

.sport-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.sport-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

/* Mixed sports card styling */
.sport-card.mixed {
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.8), rgba(138, 43, 226, 0.8));
}

/* Difficulty Page Styles */
.difficulty-page {
    display: none;
}

.difficulty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.difficulty-card {
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.difficulty-card.easy {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.8), rgba(32, 201, 151, 0.8));
}

.difficulty-card.medium {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.8), rgba(255, 140, 0, 0.8));
}

.difficulty-card.hard {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.8), rgba(253, 126, 20, 0.8));
}

.difficulty-card.impossible {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.8), rgba(52, 58, 64, 0.8));
}

.difficulty-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.difficulty-emoji {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.difficulty-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.difficulty-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
}

/* Quiz Page Styles */
.quiz-page {
    display: none;
}

.question-counter {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    color: #ffd700;
    font-weight: 700;
}

.question-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #ff6b00;
}

.question-section h2 {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
}

.hints-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.hint {
    background: linear-gradient(135deg, #ff6b00, #ff8c42);
    padding: 15px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    text-align: center;
    transform: translateY(5px);
    opacity: 0;
    animation: slideIn 0.6s ease-out forwards;
    position: relative;
    overflow: hidden;
}

.hint::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: sweep 2s infinite;
}

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

.hint:nth-child(1) { animation-delay: 0.1s; }
.hint:nth-child(2) { animation-delay: 0.2s; }
.hint:nth-child(3) { animation-delay: 0.3s; }
.hint:nth-child(4) { animation-delay: 0.4s; }
.hint:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-section {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.input-section input {
    flex: 1;
    min-width: 200px;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-family: 'Orbitron', monospace;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    outline: none;
    transition: all 0.3s ease;
}

.input-section input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.5);
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b00, #ff8c42);
    color: white;
    box-shadow: 0 8px 15px rgba(255, 107, 0, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 15px rgba(118, 75, 162, 0.3);
}

.btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
}

.btn:active:not(:disabled) {
    transform: translateY(-1px) scale(1.02);
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.result {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.result.correct {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    animation: bounce 0.6s ease;
}

.result.incorrect {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    color: white;
    animation: shake 0.6s ease;
}

.result.skipped {
    background: linear-gradient(135deg, #6c757d, #adb5bd);
    color: white;
    animation: fade 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    80% { transform: translateY(-10px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

@keyframes fade {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.score {
    text-align: center;
    font-size: 1.4rem;
    color: #ffd700;
    font-weight: 700;
    margin-bottom: 20px;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.hidden {
    display: none;
}

/* Final Results Page */
.results-page {
    display: none;
}

.final-score {
    text-align: center;
    font-size: 4rem;
    color: #ffd700;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.performance-message {
    text-align: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 30px;
    font-weight: 700;
}

.play-again-btn {
    display: block;
    margin: 0 auto;
    padding: 20px 40px;
    font-size: 1.3rem;
}

@media (max-width: 768px) {
    .header h1 { font-size: 2.5rem; }
    .game-container { padding: 20px; }
    .hints-container { grid-template-columns: 1fr; }
    .input-section { flex-direction: column; }
    .controls { flex-direction: column; }
    .sports-grid { grid-template-columns: 1fr; }
    .difficulty-grid { grid-template-columns: 1fr; }
}

/* Authentication Styles */
.user-info {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
}

.user-name {
    color: white;
    font-weight: 600;
}

.subscription-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: white;
    font-weight: 600;
}

.subscription-badge.hard {
    background: #ff6b6b;
}

.subscription-badge.impossible {
    background: #ffd700;
    color: #333;
}

.sign-out-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sign-out-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Lock and Subscription Styles */
.difficulty-card.locked {
    position: relative;
    overflow: hidden;
}

.difficulty-card.locked::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.1));
    pointer-events: none;
}

.lock-icon {
    font-size: 1.2rem;
    margin-left: 10px;
}

.unlock-text {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.subscription-modal,
.signin-modal {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

.subscription-modal h2,
.signin-modal h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.subscription-tier {
    text-align: center;
    padding: 20px;
}

.subscription-tier h3 {
    color: #666;
    margin-bottom: 10px;
}

.price {
    font-size: 3rem;
    color: #333;
    font-weight: 900;
    margin: 20px 0;
}

.price span {
    font-size: 1.2rem;
    font-weight: 400;
    color: #666;
}

.features {
    list-style: none;
    text-align: left;
    margin: 30px 0;
}

.features li {
    padding: 10px 0;
    color: #666;
    position: relative;
    padding-left: 30px;
}

.features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
}

.subscribe-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.upgrade-option {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    text-align: center;
}

.upgrade-option p {
    color: #666;
    margin-bottom: 15px;
}

.upgrade-btn {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 30px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Google Sign In Button */
.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 20px 0;
}

.google-signin-btn:hover {
    background: #f8f8f8;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.google-signin-btn img {
    width: 24px;
    height: 24px;
}

.privacy-note {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    margin-top: 20px;
}

/* Toast Messages */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    z-index: 2000;
    animation: slideUpToast 0.3s ease;
}

@keyframes slideUpToast {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.toast.success {
    background: #4caf50;
}

.toast.error {
    background: #f44336;
}