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

:root {
    --primary-color: #FFB800;
    --primary-dark: #E5A600;
    --secondary-color: #1A1A2E;
    --background: #0F0F1E;
    --card-bg: #1E1E2E;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --success: #00D084;
    --accent-gradient: linear-gradient(135deg, #FFB800 0%, #FF8C00 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
}

#app {
    width: 100%;
    min-height: 100vh;
}

.screen {
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
    background: var(--background);
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    padding: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(15, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sky {
    color: var(--text-primary);
}

.coach {
    color: var(--primary-color);
}

/* Mission Progress Bar */
.mission-progress-bar {
    margin-bottom: 30px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #FFD700 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 184, 0, 0.5);
}

.progress-info {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
}

.hero {
    text-align: center;
    margin-bottom: 60px;
}

.hero h1 {
    font-size: 32px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.hero p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 300px;
    margin: 0 auto;
}

/* Quest Preview */
.quest-preview {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 184, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.quest-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.quest-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.card-number {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    min-width: 40px;
    text-align: center;
}

.card-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

.quest-stats {
    display: flex;
    gap: 24px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Start Button */
.start-button {
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    padding: 20px 40px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 24px rgba(255, 184, 0, 0.4);
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 184, 0, 0.5);
}

.start-button:active {
    transform: translateY(-1px);
}

/* Mission reward card */
.mission-reward-card {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.1) 0%, rgba(255, 184, 0, 0.05) 100%);
    border: 2px solid rgba(255, 184, 0, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin: 30px 0;
    text-align: center;
}

.mission-reward-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mission-reward-card .artifact-name {
    font-size: 15px;
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

/* Quest Complete Screen */
.quest-complete-screen {
    text-align: center;
    padding: 40px 0;
}

.trophy-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out;
}

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

.quest-complete-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 20px 0 40px;
    line-height: 1.6;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 40px 0;
}

.result-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px 16px;
    border: 2px solid rgba(255, 184, 0, 0.2);
}

.result-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.result-label {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.final-message {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
    text-align: left;
}

.final-message h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
    text-align: center;
}

.final-message p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.final-message p:last-child {
    margin-bottom: 0;
}

.prize-section {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.1) 0%, rgba(255, 184, 0, 0.05) 100%);
    border: 2px solid rgba(255, 184, 0, 0.3);
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
}

.prize-section h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

@media (max-width: 480px) {
    .results-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .trophy-icon {
        font-size: 60px;
    }
    
    .result-number {
        font-size: 28px;
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    font-size: 14px;
    color: var(--text-secondary);
}

.skycoach-info {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 184, 0, 0.1);
    border-radius: 20px;
}

/* Quest Intro */
.quest-intro {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 184, 0, 0.2);
}

.quest-story {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    text-align: center;
}

/* Missions Grid */
.missions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.mission-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 184, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mission-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 184, 0, 0.2);
    border-color: var(--primary-color);
}

.mission-card:hover::before {
    opacity: 1;
}

.mission-icon {
    font-size: 40px;
    margin-bottom: 16px;
    text-align: center;
}

.mission-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.mission-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.mission-game {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    padding: 4px 8px;
    background: rgba(255, 184, 0, 0.1);
    border-radius: 6px;
    display: inline-block;
}

/* Animation Classes */
.slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.6s ease forwards;
}

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

/* Mission Page Specific Styles */
.mission-header {
    text-align: center;
    position: relative;
    margin-bottom: 30px;
}

.mission-world-type {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.mission-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mission-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.historical-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    border-left: 4px solid var(--secondary-color);
}

.story-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.location-info {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 184, 0, 0.1);
}

.maps-section {
    margin-bottom: 20px;
}

.maps-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.map-button {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.yandex-button {
    background: #FFCC00;
    color: #000000;
}

.yandex-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 204, 0, 0.4);
    background: #FFD633;
}

.google-button {
    background: #FFFFFF;
    color: #5F6368;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.google-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    background: #F8F9FA;
}



.answer-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 184, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 16px;
    transition: border-color 0.2s, background 0.2s;
}

.answer-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.answer-input::placeholder {
    color: var(--text-secondary);
}

.submit-button {
    width: 100%;
    background: var(--accent-gradient);
    border: none;
    border-radius: 8px;
    padding: 16px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.2s;
    margin-bottom: 20px;
}

.submit-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

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

.navigation-buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.nav-button {
    flex: 1;
    background: var(--card-bg);
    border: 2px solid rgba(255, 184, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.nav-button:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-button.primary {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

.nav-button svg {
    width: 16px;
    height: 16px;
}

/* Result Screen */
.result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 30, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.result-overlay.active {
    display: flex;
}

.result-content {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    text-align: center;
    border: 2px solid var(--primary-color);
}

.result-icon {
    width: 60px;
    height: 60px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.result-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.result-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.artifact-info {
    background: rgba(255, 184, 0, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.artifact-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.artifact-description {
    font-size: 12px;
    color: var(--text-secondary);
}

.xp-earned {
    font-size: 18px;
    font-weight: 700;
    color: var(--success);
}

/* Mission stats in footer */
.mission-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.mission-stats .stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

.mission-stats .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Prelude Section */
.prelude-section {
    margin-bottom: 40px;
}

.prelude-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    border: 2px solid transparent;
    color: white;
    position: relative;
    overflow: hidden;
}

.prelude-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.prelude-number {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.prelude-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.prelude-text {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 0;
    opacity: 0.9;
}

.prelude-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    opacity: 0.8;
}

/* Mission Complete State */
.mission-card.completed {
    border-color: var(--success);
    background: rgba(0, 208, 132, 0.1);
}

.mission-card.completed::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--success);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Coordinates text styling */
.quest-complete-screen {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.trophy-icon {
    font-size: 80px;
    margin: 30px 0;
    animation: bounce 0.6s ease;
}

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

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.result-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 184, 0, 0.2);
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
}

.result-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.result-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.final-message {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
    border-left: 4px solid var(--primary-color);
    text-align: left;
}

.final-message h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
    text-align: center;
}

.final-message p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.prize-section {
    margin: 40px 0;
}

.prize-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.prize-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 16px;
    padding: 30px;
    color: white;
    position: relative;
    overflow: hidden;
}

.prize-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.prize-code {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.prize-desc {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.prize-note {
    font-size: 14px;
    opacity: 0.9;
}

/* Mission Complete State */
.mission-card.completed {
    border-color: var(--success);
    background: rgba(0, 208, 132, 0.1);
}

.mission-card.completed::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--success);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Coordinates text styling */
.coordinates-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.coordinates-text strong {
    color: var(--text-primary);
}

/* Answer hint styling */
.answer-hint {
    color: var(--text-secondary);
    line-height: 1.6;
}

.answer-hint a {
    color: var(--primary-color);
    text-decoration: none;
}

.answer-hint a:hover {
    text-decoration: underline;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .location-image {
        height: 200px;
        border-radius: 12px;
    }
    
    .missions-grid {
        grid-template-columns: 1fr;
    }
    
    .mission-title {
        font-size: 24px;
    }
    
    .maps-buttons {
        flex-direction: column;
    }
    
    .navigation-buttons {
        flex-direction: column;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-number {
        font-size: 28px;
    }
    
    .prize-code {
        font-size: 24px;
    }
    
    .final-message {
        padding: 20px;
    }
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 184, 0, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Quest Location Styles */
.location-screen {
    display: none;
}

.location-screen.active {
    display: block;
}

.location-header {
    padding: 20px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.location-number {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 8px;
}

.location-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.location-hint {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-style: italic;
}

.location-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.task-description {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
}

.task-description h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.task-description p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.task-input {
    width: 100%;
    background: var(--card-bg);
    border: 2px solid rgba(255, 184, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 20px;
    transition: border-color 0.2s;
}

.task-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.task-input::placeholder {
    color: var(--text-secondary);
}

.complete-button {
    width: 100%;
    background: var(--accent-gradient);
    border: none;
    border-radius: 8px;
    padding: 16px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-bottom: 20px;
}

.complete-button:hover {
    opacity: 0.9;
}

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

.progress-bar {
    background: rgba(255, 184, 0, 0.2);
    border-radius: 4px;
    height: 8px;
    margin-bottom: 10px;
}

.progress-fill {
    background: var(--accent-gradient);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.progress-info {
    margin-top: 30px;
}

/* Team Registration Forms */
.registration-form {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 184, 0, 0.2);
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 184, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    color: var(--text-primary);
    transition: border-color 0.2s, background 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
    color: var(--text-secondary);
}

/* Team Info Card */
.team-info-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 184, 0, 0.2);
    text-align: center;
}

.team-info-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.team-info-card p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.team-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.team-stat {
    text-align: center;
}

.team-stat .stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.team-stat .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Maps Buttons */
.maps-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.map-button {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 14px 16px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.yandex-button {
    background: #FC3F1D;
}

.yandex-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(252, 63, 29, 0.5);
    background: #E63C1A;
}

.google-button {
    background: #4285F4;
}

.google-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.5);
    background: #3578E5;
}

/* Telegram Button */
.telegram-button {
    width: 100%;
    background: #0088CC;
    border: none;
    border-radius: 8px;
    padding: 16px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    transition: opacity 0.2s, transform 0.2s;
}

.telegram-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.telegram-button:active {
    transform: translateY(0);
}

/* Back Button */
.back-button {
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.back-button:hover {
    background: rgba(255, 184, 0, 0.1);
}

/* Success Animation */
.success-animation {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    z-index: 1000;
    border: 2px solid var(--primary-color);
}

.success-animation.active {
    display: block;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.success-icon {
    width: 60px;
    height: 60px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .quest-preview {
        padding: 20px;
    }
    
    .location-name {
        font-size: 22px;
    }
    
    .team-stats {
        gap: 20px;
    }
    
    .maps-buttons {
        flex-direction: column;
    }
}

/* Prevent zoom on input focus */
input, textarea, select {
    font-size: 16px;
}

/* Route Selector Styles */
.route-selector {
    animation: slideUp 0.4s ease-out;
}

.route-header {
    text-align: center;
    margin-bottom: 30px;
}

.route-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.route-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

.route-info {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.route-name {
    color: var(--primary-color);
    font-weight: 600;
}

.route-preview {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 184, 0, 0.1);
}

.route-preview h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.missions-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mission-timeline-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: rgba(255, 184, 0, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 184, 0, 0.1);
    transition: all 0.3s ease;
}

.mission-timeline-item:hover {
    background: rgba(255, 184, 0, 0.08);
    transform: translateY(-2px);
}

.mission-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-right: 16px;
}

.mission-details {
    flex: 1;
}

.mission-details h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.mission-type {
    font-size: 14px;
    color: var(--text-secondary);
}

.mission-arrow {
    color: var(--primary-color);
    opacity: 0.6;
}

.route-stats {
    display: flex;
    justify-content: space-around;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 184, 0, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-item .stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-item .stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.begin-quest {
    text-align: center;
    margin-top: 40px;
}

.begin-quest h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.verification-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.verification-error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
}

.verification-success {
    background: rgba(0, 208, 132, 0.1);
    border: 1px solid rgba(0, 208, 132, 0.3);
    color: #00D084;
}

/* 2FA-style Code Input Styles */
.code-entry-section {
    margin-top: 40px;
}

.code-container {
    max-width: 500px;
    margin: 0 auto;
}

.code-form {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px 30px;
    border: 1px solid rgba(255, 184, 0, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.code-form h2 {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.code-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.code-2fa-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    padding: 0 10px;
}

.code-digit {
    width: 50px;
    height: 60px;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    caret-color: var(--primary-color);
}

.code-digit:focus {
    border-color: var(--primary-color);
    background: rgba(255, 184, 0, 0.1);
    box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.1),
                0 0 20px rgba(255, 184, 0, 0.2);
    transform: translateY(-2px);
}

.code-digit:not(:placeholder-shown) {
    border-color: var(--primary-color);
    background: rgba(255, 184, 0, 0.05);
}

.code-separator {
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 5px;
}

.verify-button {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #FFD700 100%);
    color: var(--background);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 184, 0, 0.3);
}

.verify-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 184, 0, 0.4);
}

.verify-button:active {
    transform: translateY(0);
}

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

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

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

.pulse-success {
    animation: pulse-success 0.5s ease-in-out;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .hero h1 {
        font-size: 28px;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .code-form {
        padding: 30px 20px;
    }
    
    .code-form h2 {
        font-size: 20px;
    }
    
    .code-hint {
        font-size: 13px;
    }
    
    .code-digit {
        width: 45px;
        height: 55px;
        font-size: 24px;
    }
    
    .code-2fa-container {
        gap: 8px;
        padding: 0 5px;
    }
    
    .code-separator {
        width: 15px;
        margin: 0 3px;
    }
    
    .verify-button {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    /* Route display mobile */
    .route-header h2 {
        font-size: 22px;
    }
    
    .route-preview h3 {
        font-size: 18px;
    }
    
    .mission-timeline-item {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .mission-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
        margin-right: 12px;
    }
    
    .mission-details h4 {
        font-size: 15px;
    }
    
    .mission-type {
        font-size: 13px;
    }
    
    .begin-quest {
        padding: 25px 20px;
    }
    
    .begin-quest h4 {
        font-size: 18px;
    }
    
    .start-button {
        padding: 16px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px;
    }
    
    .code-form {
        padding: 25px 15px;
    }
    
    .code-digit {
        width: 42px;
        height: 52px;
        font-size: 22px;
    }
    
    .code-2fa-container {
        gap: 6px;
    }
    
    .verify-button {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .route-header h2 {
        font-size: 20px;
    }
    
    .mission-timeline-item {
        padding: 10px;
    }
    
    .mission-number {
        width: 32px;
        height: 32px;
        font-size: 13px;
        margin-right: 10px;
    }
    
    .mission-details h4 {
        font-size: 14px;
    }
    
    .start-button {
        padding: 14px 18px;
        font-size: 14px;
    }
}

/* Telegram button */
.answer-section {
    margin-top: 24px;
}

.telegram-button {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #0088cc 0%, #00a0e9 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

.telegram-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
    background: linear-gradient(135deg, #0099dd 0%, #00b0fa 100%);
    outline: none !important;
    border: none !important;
}

.telegram-button:active {
    transform: translateY(0);
    outline: none !important;
    border: none !important;
}

.telegram-button:focus {
    outline: none !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.5);
}

.telegram-button:focus-visible {
    outline: none !important;
    border: none !important;
}

@media (max-width: 380px) {
    .code-digit {
        width: 38px;
        height: 48px;
        font-size: 20px;
    }
    
    .code-2fa-container {
        gap: 5px;
    }
    
    .code-separator {
        width: 12px;
    }
    
    .verify-button {
        padding: 12px 14px;
        font-size: 13px;
        gap: 6px;
    }
    
    .verify-button svg {
        width: 16px;
        height: 16px;
    }
    
    .route-header h2 {
        font-size: 18px;
    }
    
    .route-preview h3 {
        font-size: 16px;
    }
    
    .mission-timeline-item {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .start-button {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Modal for code input */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px 24px;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-content h2 {
    font-size: 20px;
    margin-bottom: 24px;
    text-align: center;
    color: var(--text-primary);
}

.modal-content input {
    width: 100%;
    padding: 16px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    border: 2px solid rgba(255, 184, 0, 0.3);
    border-radius: 12px;
    background: var(--background);
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 184, 0, 0.3);
}

.modal-content input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
    letter-spacing: normal;
}

.modal-content button {
    width: 100%;
    padding: 16px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 184, 0, 0.4);
}

.modal-content button:active {
    transform: translateY(0);
}

.error-message {
    color: #ff4444;
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
    min-height: 20px;
    animation: shake 0.5s ease;
}

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

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}
