/* W3 Game Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
.header {
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 2px solid #ffd700;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.status-badge {
    display: flex;
    align-items: center;
    background: rgba(255, 215, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #ffd700;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ff4444;
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Screen Transitions */
.registration-screen,
.waiting-screen,
.game-screen {
    display: none;
    text-align: center;
    padding: 2rem 1rem;
    width: 100%;
}

.registration-screen.active,
.waiting-screen.active,
.game-screen.active {
    display: block;
}

/* Registration Screen */
.registration-screen {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    margin: 1rem;
    padding: 2rem 1rem;
}

.reg-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.reg-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #ffd700;
}

.form-input {
    width: 100%;
    padding: 1rem;
    margin: 0.5rem 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

select.form-input {
    cursor: pointer;
}

select.form-input option {
    background: #1a1a2e;
    color: white;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Waiting Screen */
.waiting-screen {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    margin: 1rem;
    padding: 2rem 1rem;
}

.waiting-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.waiting-message {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.players-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.players-number {
    font-size: 4rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.score-label {
    font-size: 1rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin-top: 0.5rem;
}

/* Game Screen */
.game-screen {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    margin: 1rem;
    padding: 2rem 1rem;
}

.timer-section {
    text-align: center;
    margin-bottom: 2rem;
}

.timer-display {
    font-size: 4rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.timer-display.urgent {
    color: #ff4444;
    animation: pulse 1s infinite;
}

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

.clue-number {
    font-size: 1.2rem;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.clue-section {
    background: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    border: 2px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
}

.clue-text {
    font-size: 1.4rem;
    line-height: 1.6;
    text-align: center;
    color: #ffd700;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.answer-section {
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.answer-input-group {
    display: flex;
    gap: 1rem;
}

.answer-input {
    flex: 1;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.1rem;
}

.answer-input:focus {
    outline: none;
    border-color: #ffd700;
}

.answer-locked {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 15px;
    border: 2px solid #ffd700;
}

.locked-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.locked-message {
    font-size: 1.2rem;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin-bottom: 1rem;
}

.locked-answer {
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.score-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.score-card {
    background: rgba(0, 0, 0, 0.7);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
}

.score-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.your-score {
    color: #4ecdc4;
}

.tv-score {
    color: #ff6b6b;
}

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: #27ae60;
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1001;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.notification.show {
    opacity: 1;
}

.notification.error {
    background: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .reg-title {
        font-size: 2rem;
    }

    .timer-display {
        font-size: 3rem;
    }

    .players-number {
        font-size: 3rem;
    }

    .answer-input-group {
        flex-direction: column;
    }

    .score-section {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffd700;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Game Results */
.game-results {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    margin: 2rem auto;
    max-width: 500px;
}

.game-results h2 {
    color: #ffd700;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.final-scores {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
    gap: 2rem;
}

.final-scores .score-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #ffd700;
    flex: 1;
}

.final-scores .score-card h3 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.final-scores .score-card .score {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Enhanced Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    border-left: 4px solid #ffd700;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
    font-weight: 500;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
    backdrop-filter: blur(10px);
}

.notification.error {
    border-left-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    backdrop-filter: blur(10px);
}