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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* HOME PAGE */
.home-container {
    width: 100%;
    max-width: 900px;
    animation: slideIn 0.6s ease;
}

.snow-leopard-header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.snow-leopard-header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: bounce 2s infinite;
}

.subtitle {
    font-size: 1.3em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.home-content {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.mountain-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 200px;
    background: linear-gradient(to bottom, #e0f2fe 0%, #bae6fd 50%, #7dd3fc 100%);
    border-radius: 20px 0 0 0;
    opacity: 0.3;
}

.welcome-box {
    position: relative;
    z-index: 1;
}

.welcome-box h2 {
    color: #764ba2;
    font-size: 2.5em;
    margin-bottom: 15px;
}

.welcome-box p {
    color: #555;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 25px;
}

.instructions {
    background: linear-gradient(to right, #f0f4ff, #f9f3ff);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border-left: 4px solid #764ba2;
}

.instructions h3 {
    color: #764ba2;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.instructions ul {
    list-style: none;
    color: #555;
}

.instructions li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    font-size: 1.05em;
}

.instructions li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #764ba2;
    font-weight: bold;
}

/* TEAM SETUP PAGE */
.team-setup-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.team-setup-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    text-align: center;
    animation: slideIn 0.6s ease;
}

.team-setup-box h1 {
    color: #764ba2;
    font-size: 2.5em;
    margin-bottom: 15px;
}

.team-setup-box p {
    color: #555;
    font-size: 1.2em;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #764ba2;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 10px rgba(118, 75, 162, 0.3);
}

/* ESCAPE ROOM CONTAINER */
.escape-room-container {
    width: 100%;
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.header-bar {
    background: linear-gradient(to right, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-bar h1 {
    font-size: 2em;
    flex: 1;
}

.timer-box {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1.5em;
    font-weight: bold;
    display: flex;
    gap: 10px;
    align-items: center;
}

.timer {
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.3);
    padding: 5px 15px;
    border-radius: 5px;
    min-width: 80px;
    text-align: center;
}

.timer.warning {
    background: #ff6b6b;
    animation: pulse 1s infinite;
}

.escape-room-content {
    padding: 30px;
    min-height: 500px;
}

.timer-label {
    display: none;
}

/* PUZZLE PAGE */
.puzzle-page {
    animation: slideIn 0.6s ease;
}

.story-box {
    background: linear-gradient(to right, #e8f4f8, #f0e8f8);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.story-box h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.story-text {
    color: #555;
    font-size: 1.05em;
    margin-bottom: 20px;
    font-weight: 500;
}

.story-narrative {
    background: rgba(255, 255, 255, 0.6);
    padding: 20px;
    border-radius: 8px;
}

.story-narrative p {
    color: #555;
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 1em;
}

.story-narrative p:first-child {
    margin-top: 0;
}

.hint-text {
    color: #667eea;
    font-style: italic;
    background: rgba(102, 126, 234, 0.1);
    padding: 10px;
    border-left: 3px solid #667eea;
    margin: 12px 0;
    border-radius: 4px;
}

.puzzle-container {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
}

.puzzle-question {
    text-align: left;
}

.puzzle-question h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.puzzle-hint {
    color: #ffc107;
    font-weight: bold;
    background: #fffacd;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    display: inline-block;
}

.puzzle-input {
    display: flex;
    gap: 10px;
}

.puzzle-input input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}

.puzzle-input input:focus {
    outline: none;
    border-color: #667eea;
}

.puzzle-input button {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.puzzle-input button:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

.puzzle-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.result {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.navigation-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

/* MENU PAGE */
.menu-box {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 15px;
    padding: 30px;
}

.menu-box h2 {
    color: #764ba2;
    margin-bottom: 10px;
    font-size: 2em;
}

.menu-box p {
    color: #555;
    margin-bottom: 25px;
    font-size: 1.1em;
}

.story-section {
    background: linear-gradient(to right, #e8f4f8, #f0e8f8);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.story-section h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.story-section p {
    color: #555;
    font-size: 1.05em;
    line-height: 1.6;
}

.puzzle-menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 0;
}

.menu-item {
    background: linear-gradient(to right, #f8f9ff, #fff8f9);
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
}

.menu-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.menu-item h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.menu-item p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.menu-item button {
    width: 100%;
}

.menu-item button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* FINAL PUZZLE PAGE */
.final-puzzle-page {
    animation: slideIn 0.6s ease;
}

.final-puzzle-page .story-box {
    background: linear-gradient(to right, #fff3cd, #fffacd);
    border-left-color: #ff6b00;
}

.final-puzzle-page .story-box h2 {
    color: #ff6b00;
}

.final-puzzle-page .story-narrative {
    background: rgba(255, 255, 255, 0.8);
}

/* RESULT PAGES */
.result-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.result-content {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 50px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: slideIn 0.6s ease;
}

.win-container {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
}

.lose-container {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
}

.celebration {
    font-size: 4em;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.sad-emoji {
    font-size: 4em;
    margin-bottom: 20px;
}

.result-content h1 {
    font-size: 3em;
    margin-bottom: 30px;
    font-weight: bold;
}

.win-container h1 {
    color: #28a745;
    text-shadow: 2px 2px 4px rgba(40, 167, 69, 0.2);
}

.lose-container h1 {
    color: #dc3545;
    text-shadow: 2px 2px 4px rgba(220, 53, 69, 0.2);
}

.win-stats,
.lose-stats {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 25px;
    margin: 25px 0;
    border: 2px solid #e0e0e0;
}

.stat {
    margin-bottom: 20px;
}

.stat:last-child {
    margin-bottom: 0;
}

.stat label {
    display: block;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.stat p {
    color: #555;
    font-size: 1.3em;
    font-weight: bold;
}

.message {
    color: #555;
    font-size: 1.05em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.snow-leopard-message {
    background: linear-gradient(to right, #f0f4ff, #f9f3ff);
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
    border-left: 4px solid #667eea;
}

.snow-leopard-message p:first-child {
    color: #667eea;
    font-weight: bold;
    margin-bottom: 10px;
}

.quote {
    color: #555;
    font-style: italic;
    font-size: 1.1em;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* BUTTONS */
.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(to right, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

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

/* ANIMATIONS */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

/* RESPONSIVE */
@media (max-width: 768px) {
    .home-content {
        padding: 25px;
    }
    
    .snow-leopard-header h1 {
        font-size: 2em;
    }
    
    .result-content {
        padding: 30px;
    }
    
    .result-content h1 {
        font-size: 2em;
    }
    
    .header-bar {
        flex-direction: column;
        text-align: center;
    }
    
    .header-bar h1 {
        margin-bottom: 10px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .puzzle-input {
        flex-direction: column;
    }
    
    .story-box {
        padding: 15px;
    }
    
    .hint-text {
        font-size: 0.9em;
    }
}
