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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    height: 100vh;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

#start-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.start-container {
    text-align: center;
    color: white;
    max-width: 500px;
    padding: 2rem;
}

.logo h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 3rem;
}

.instructions {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.instructions h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.instructions ul {
    list-style: none;
    text-align: left;
}

.instructions li {
    padding: 0.75rem 0;
    font-size: 1.1rem;
    opacity: 0.95;
}

.start-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(238, 90, 36, 0.3);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(238, 90, 36, 0.4);
}

#game-screen {
    background: #1a1a1a;
}

.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.compass {
    position: relative;
    width: 60px;
    height: 60px;
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.compass-needle {
    position: absolute;
    width: 2px;
    height: 20px;
    background: #ff6b6b;
    transform-origin: bottom center;
    transition: transform 0.3s ease;
}

.compass-text {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.timer-container {
    text-align: center;
}

.timer {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.round-info {
    text-align: right;
    color: white;
}

.round-info span {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.street-view {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
}

.guess-map-container {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 350px;
    height: 250px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 12px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
}

.guess-map {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.3);
}

.submit-btn:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-overlay p {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
}

.result-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.result-map {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.next-round-btn {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.next-round-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.3);
}

#results-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.results-container {
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 2rem;
}

.results-container h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.final-score {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-label {
    display: block;
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.score-value {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.score-max {
    font-size: 1.5rem;
    opacity: 0.8;
}

.round-breakdown {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.round-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.round-item:last-child {
    border-bottom: none;
}

.round-number {
    font-weight: 600;
}

.round-score {
    font-weight: 700;
    color: #4ecdc4;
}

.play-again-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(238, 90, 36, 0.3);
}

.play-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(238, 90, 36, 0.4);
}

@media (max-width: 768px) {
    .top-bar {
        padding: 0 1rem;
        height: 70px;
    }
    
    .compass {
        width: 50px;
        height: 50px;
    }
    
    .timer {
        font-size: 1.5rem;
    }
    
    .guess-map-container {
        width: 280px;
        height: 200px;
        bottom: 1rem;
        right: 1rem;
    }
    
    .guess-map {
        height: 130px;
    }
    
    .street-view {
        top: 70px;
    }
    
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .results-container h1 {
        font-size: 2rem;
    }
    
    .score-value {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .guess-map-container {
        width: calc(100% - 2rem);
        height: 180px;
        left: 1rem;
        right: 1rem;
    }
    
    .top-bar {
        flex-direction: column;
        height: auto;
        padding: 1rem;
    }
    
    .street-view {
        top: 120px;
    }
}