/**
 * Circaevum Styles
 * All styling for the planetary time visualization
 */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Space+Mono:wght@400;700&display=swap');

/* ============================================
   CSS VARIABLES (Theme Colors)
   ============================================ */
:root {
    --deep-space: #000814;
    --star-field: #001d3d;
    --nebula-blue: #003566;
    --cosmic-cyan: #00b4d8;
    --solar-yellow: #ffd60a;
    --plasma-pink: #ff006e;
    --orbit-silver: #8ecae6;
}

body.light-mode {
    --deep-space: #e8f4f8;
    --star-field: #d4e9f0;
    --nebula-blue: #b8d8e6;
    --cosmic-cyan: #0077a3;
    --solar-yellow: #f4a300;
    --plasma-pink: #d4006e;
    --orbit-silver: #2a5f7f;
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Mono', monospace;
    background: var(--deep-space);
    color: var(--orbit-silver);
    overflow: hidden;
    cursor: crosshair;
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* ============================================
   HUD (Heads Up Display)
   ============================================ */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.title-block {
    position: absolute;
    top: 40px;
    left: 40px;
    pointer-events: auto;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 3.5rem;
    letter-spacing: 0.15em;
    color: var(--solar-yellow);
    text-shadow: 
        0 0 20px var(--solar-yellow),
        0 0 40px var(--cosmic-cyan),
        0 0 60px var(--nebula-blue);
    margin-bottom: 8px;
    animation: titlePulse 4s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { 
        opacity: 1; 
        text-shadow: 0 0 20px var(--solar-yellow), 0 0 40px var(--cosmic-cyan), 0 0 60px var(--nebula-blue); 
    }
    50% { 
        opacity: 0.85; 
        text-shadow: 0 0 30px var(--solar-yellow), 0 0 50px var(--cosmic-cyan), 0 0 70px var(--nebula-blue); 
    }
}

.subtitle {
    font-size: 0.95rem;
    letter-spacing: 0.3em;
    color: var(--cosmic-cyan);
    text-transform: uppercase;
    opacity: 0.8;
}

/* ============================================
   CONTROLS (Bottom Zoom Slider)
   ============================================ */
.controls {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0;
    z-index: 100;
    background: rgba(0, 8, 20, 0.85);
    backdrop-filter: blur(10px);
    padding: 8px 25px;
    border-radius: 50px;
    border: 2px solid var(--cosmic-cyan);
    box-shadow: 0 0 30px rgba(0, 180, 216, 0.3);
    pointer-events: auto;
}

.zoom-slider {
    display: flex;
    gap: 0;
    align-items: stretch;
}

.zoom-option {
    padding: 6px 15px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(0, 180, 216, 0.2);
    min-width: 50px;
}

.zoom-option:first-child {
    border-radius: 20px 0 0 20px;
}

.zoom-option:last-child {
    border-radius: 0 20px 20px 0;
    border-right: none;
}

.zoom-option:hover {
    background: rgba(0, 180, 216, 0.2);
}

.zoom-option.active {
    background: var(--cosmic-cyan);
    color: var(--deep-space);
}

.zoom-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 2px;
}

.zoom-desc {
    font-family: 'Space Mono', monospace;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* ============================================
   TOGGLE CONTROLS (Right Side)
   ============================================ */
.toggle-controls {
    position: fixed;
    top: 20px;
    right: 30px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    z-index: 100;
}

.toggle-btn {
    background: rgba(0, 8, 20, 0.85);
    backdrop-filter: blur(10px);
    border: 2px solid var(--cosmic-cyan);
    color: var(--cosmic-cyan);
    padding: 10px 16px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    white-space: nowrap;
    pointer-events: auto;
}

.toggle-btn:hover {
    background: rgba(0, 180, 216, 0.2);
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.3);
}

.toggle-btn.active {
    background: var(--cosmic-cyan);
    color: var(--deep-space);
    box-shadow: 0 0 30px rgba(0, 180, 216, 0.5);
}

/* ============================================
   INFO PANEL (Top Left)
   ============================================ */
.info-panel {
    position: fixed;
    top: 80px;
    right: 30px;
    background: rgba(0, 8, 20, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid var(--cosmic-cyan);
    border-radius: 15px;
    padding: 20px 25px;
    min-width: 280px;
    box-shadow: 0 0 30px rgba(0, 180, 216, 0.3);
    pointer-events: none;
    z-index: 150;
}

.info-panel h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: var(--cosmic-cyan);
    margin-bottom: 16px;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--nebula-blue);
    padding-bottom: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.info-label {
    color: var(--orbit-silver);
    opacity: 0.7;
}

.info-value {
    color: var(--solar-yellow);
    font-weight: 700;
}

/* ============================================
   LOADING SCREEN
   ============================================ */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid var(--nebula-blue);
    border-top: 4px solid var(--cosmic-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    font-family: 'Orbitron', sans-serif;
    color: var(--cosmic-cyan);
    letter-spacing: 0.2em;
    animation: pulse 2s ease-in-out infinite;
}

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

/* ============================================
   LANDING PAGE
   ============================================ */
.landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #000814 0%, #001d3d 50%, #002855 100%);
    overflow-y: auto;
    z-index: 200;
    display: none;
    padding: 100px 20px 40px 20px;
}

.landing-page.active {
    display: block;
}

.landing-content {
    max-width: 800px;
    margin: 0 auto;
    color: var(--cosmic-cyan);
}

.landing-hero {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 20px;
    position: relative;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(142, 202, 230, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5; }
    50% { transform: translateX(-50%) scale(1.1); opacity: 0.8; }
}

.landing-hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 72px;
    color: var(--cosmic-gold);
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
    position: relative;
    z-index: 1;
}

.landing-hero .tagline {
    font-family: 'Space Mono', monospace;
    font-size: 24px;
    letter-spacing: 3px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.landing-section {
    margin-bottom: 50px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.03) 0%, rgba(142, 202, 230, 0.05) 100%);
    border-left: 3px solid var(--cosmic-cyan);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.1);
    position: relative;
    overflow: hidden;
}

.landing-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.landing-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    color: var(--cosmic-cyan);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.landing-section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, var(--cosmic-cyan) 0%, transparent 100%);
}

.landing-section p {
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    line-height: 1.8;
    color: rgba(142, 202, 230, 0.9);
    margin-bottom: 15px;
    position: relative;
}

.landing-section p strong {
    color: rgba(255, 193, 7, 0.9);
    font-weight: 600;
}

/* Harmony symbols */
.harmony-symbol {
    display: inline-block;
    color: rgba(142, 202, 230, 0.4);
    margin: 0 8px;
    font-size: 12px;
}

/* ============================================
   REGISTRATION FORM
   ============================================ */
.registration-form {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.05) 0%, rgba(142, 202, 230, 0.08) 100%);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid var(--cosmic-cyan);
    box-shadow: 0 8px 25px rgba(0, 180, 216, 0.15);
    position: relative;
}

.registration-form::before {
    content: '◐';
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 48px;
    color: rgba(142, 202, 230, 0.1);
}

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

.form-group label {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: var(--cosmic-cyan);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 8, 20, 0.8);
    border: 1px solid rgba(0, 180, 216, 0.5);
    border-radius: 8px;
    color: var(--cosmic-cyan);
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--cosmic-gold);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.2), 0 0 30px rgba(0, 180, 216, 0.1);
    background: rgba(0, 8, 20, 0.9);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--cosmic-cyan) 0%, rgba(0, 180, 216, 0.8) 100%);
    border: none;
    border-radius: 8px;
    color: #000814;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--cosmic-gold) 0%, rgba(255, 193, 7, 0.8) 100%);
    box-shadow: 0 6px 25px rgba(255, 193, 7, 0.4);
    transform: translateY(-2px);
}

.explore-btn {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 180, 216, 0.1) 100%);
    border: 2px solid var(--cosmic-cyan);
    border-radius: 50px;
    color: var(--cosmic-cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.2);
    position: relative;
    z-index: 1;
}

.explore-btn:hover {
    background: linear-gradient(135deg, var(--cosmic-cyan) 0%, rgba(0, 180, 216, 0.9) 100%);
    color: #000814;
    box-shadow: 0 6px 25px rgba(0, 180, 216, 0.4);
    transform: translateY(-2px);
}

/* Balance and harmony accents */
.balance-accent {
    text-align: center;
    color: rgba(142, 202, 230, 0.5);
    font-family: 'Space Mono', monospace;
    font-size: 24px;
    margin: 30px 0;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablet and below (768px and smaller) */
@media screen and (max-width: 768px) {
    /* Hide the Orbital Data panel on mobile */
    .info-panel {
        display: none !important;
    }
    
    /* Scale down the title block */
    .title-block {
        top: 20px;
        left: 20px;
    }
    
    h1 {
        font-size: 2rem;
        letter-spacing: 0.1em;
    }
    
    .subtitle {
        font-size: 0.75rem;
        letter-spacing: 0.2em;
    }
    
    /* Adjust toggle controls for mobile */
    .toggle-controls {
        top: 15px;
        right: 15px;
        gap: 6px;
    }
    
    .toggle-btn {
        padding: 8px 10px;
        font-size: 9px;
        border-radius: 20px;
    }
    
    /* Make zoom slider scrollable on mobile */
    .controls {
        bottom: 20px;
        padding: 6px 12px;
        max-width: calc(100vw - 30px);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .zoom-slider {
        flex-wrap: nowrap;
    }
    
    .zoom-option {
        padding: 5px 10px;
        min-width: 40px;
        flex-shrink: 0;
    }
    
    .zoom-number {
        font-size: 14px;
    }
    
    .zoom-desc {
        font-size: 7px;
    }
    
    /* Landing page adjustments */
    .landing-page {
        padding: 80px 15px 30px 15px;
    }
    
    .landing-hero h1 {
        font-size: 36px;
    }
    
    .landing-hero .tagline {
        font-size: 16px;
        letter-spacing: 2px;
    }
    
    .landing-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .landing-section h2 {
        font-size: 22px;
    }
    
    .landing-section p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .explore-btn {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    .registration-form {
        padding: 20px;
    }
    
    .registration-form::before {
        font-size: 32px;
        top: 10px;
        right: 15px;
    }
}

/* Small phones (480px and smaller) */
@media screen and (max-width: 480px) {
    /* Further scale down title */
    .title-block {
        top: 15px;
        left: 15px;
    }
    
    h1 {
        font-size: 1.5rem;
        letter-spacing: 0.08em;
    }
    
    .subtitle {
        font-size: 0.65rem;
        letter-spacing: 0.15em;
    }
    
    /* Stack toggle controls vertically on very small screens */
    .toggle-controls {
        flex-direction: column;
        top: auto;
        bottom: 90px;
        right: 10px;
        gap: 5px;
    }
    
    .toggle-btn {
        padding: 6px 8px;
        font-size: 8px;
    }
    
    /* Compact zoom slider even more */
    .controls {
        bottom: 15px;
        padding: 5px 8px;
    }
    
    .zoom-option {
        padding: 4px 8px;
        min-width: 35px;
    }
    
    .zoom-number {
        font-size: 12px;
    }
    
    .zoom-desc {
        font-size: 6px;
    }
    
    /* Landing page further adjustments */
    .landing-hero h1 {
        font-size: 28px;
    }
    
    .landing-hero .tagline {
        font-size: 14px;
        letter-spacing: 1px;
    }
    
    .landing-section h2 {
        font-size: 18px;
    }
    
    .landing-section p {
        font-size: 13px;
    }
    
    .explore-btn {
        padding: 10px 20px;
        font-size: 12px;
        letter-spacing: 1px;
    }
    
    .submit-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Prevent text selection and improve touch experience */
@media (hover: none) and (pointer: coarse) {
    /* Touch device specific styles */
    body {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Larger touch targets for buttons */
    .zoom-option {
        min-height: 44px;
    }
    
    .toggle-btn {
        min-height: 40px;
    }
    
    /* Prevent pull-to-refresh on the canvas */
    #canvas-container {
        touch-action: none;
        overscroll-behavior: none;
    }
}

/* Landscape mode on mobile */
@media screen and (max-height: 480px) and (orientation: landscape) {
    .title-block {
        top: 10px;
        left: 15px;
    }
    
    h1 {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }
    
    .subtitle {
        font-size: 0.6rem;
    }
    
    .toggle-controls {
        top: 10px;
        right: 10px;
        flex-direction: row;
    }
    
    .toggle-btn {
        padding: 5px 8px;
        font-size: 8px;
    }
    
    .controls {
        bottom: 10px;
        padding: 4px 10px;
    }
    
    .zoom-option {
        padding: 3px 6px;
        min-width: 30px;
    }
    
    .zoom-number {
        font-size: 11px;
    }
    
    .zoom-desc {
        font-size: 5px;
    }
    
    /* Hide landing page content in landscape mobile */
    .landing-page {
        padding: 60px 15px 20px 15px;
    }
}


