/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    overflow-x: hidden;
}

/* Background gradients */
#app {
    min-height: 100vh;
    background: linear-gradient(135deg, #87ceeb 0%, #4682b4 50%, #1e40af 100%);
    transition: background 0.5s ease;
}

#app.extreme-latitude {
    background: linear-gradient(135deg, #4682b4 0%, #1e40af 50%, #000000 100%);
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Loading spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

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

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

/* Permission prompt */
.permission-prompt, .error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.prompt-content, .error-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.prompt-content h2, .error-content h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.prompt-content p, .error-content p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.primary-btn {
    background: linear-gradient(135deg, #60a5fa, #1e40af);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

/* Main content layout */
#main-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Time section */
.time-section {
    text-align: center;
    margin-bottom: 2rem;
}

.time-section h1 {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.time-display {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-variant-numeric: tabular-nums;
}

.location-info {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 300;
}

/* Status indicators */
.status-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.status-indicator.online {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.3);
}

.status-indicator.offline {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}

.status-indicator.current-location {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.3);
}

.status-indicator.cached-location {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.3);
}

.status-icon {
    font-size: 0.9rem;
}

.status-text {
    opacity: 0.9;
}

/* Visualization section */
.visualization-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
}

.extreme-message {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 25px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#analemma-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.2));
}

.analemma-line {
    stroke: #60a5fa;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.sun-icon {
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.6));
}

/* Direction section */
.direction-section {
    text-align: center;
    margin-top: 2rem;
}

.direction-arrow {
    display: inline-block;
    margin-bottom: 1rem;
    position: relative;
}

.direction-arrow svg {
    width: 80px;
    height: 80px;
    transform: rotateX(20deg) rotateY(5deg);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.direction-arrow:hover svg {
    transform: rotateX(25deg) rotateY(10deg) translateY(-5px);
}

.arrow-shape {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.direction-label {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.direction-text {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* Responsive design */
@media (max-width: 480px) {
    #main-content {
        padding: 1rem 0.5rem;
    }
    
    .time-display {
        font-size: 2rem;
    }
    
    .time-section h1 {
        font-size: 1.4rem;
    }
    
    .direction-arrow svg {
        width: 60px;
        height: 60px;
    }
}

@media (min-width: 768px) {
    #main-content {
        padding: 3rem 2rem;
    }
    
    .time-display {
        font-size: 4rem;
    }
} 