:root {
    --speed: 30s;
    --brand-green: #adff5f;
    --brand-blue: #00008b;
    --error-red: #ff3e3e;
    
    /* Light Theme Variables */
    --bg-primary: #ffffff;
    --bg-secondary: #fdfdfd;
    --text-main: #2c3e50;
    --text-muted: #95a5a6;
    --card-bg: #ffffff;
    --input-border: #f2f2f2;
    --timer-bg: #eee;
    --footer-bg: #f8f9fa;
}

/* Dark Theme Variables */
body.dark-mode {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --text-main: #f0f0f0;
    --text-muted: #888888;
    --card-bg: #1a1a1a;
    --input-border: #333333;
    --timer-bg: #222222;
    --footer-bg: #0d0d0d;
}

html { scroll-behavior: smooth; }
body { 
    margin: 0; padding: 0; overflow: hidden; 
    background: var(--bg-primary); color: var(--text-main);
    font-family: 'Montserrat', sans-serif; width: 100vw; overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

/* --- Theme Toggle --- */
.theme-toggle {
    position: fixed; top: 20px; right: 20px; z-index: 1000;
    width: 45px; height: 45px; border-radius: 50%;
    background: var(--card-bg); border: 2px solid var(--input-border);
    color: var(--text-main); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: 0.3s;
}
.theme-toggle:hover { transform: scale(1.1); }

/* --- Hero Section --- */
.hero-section { width: 100%; height: 100vh; position: relative; display: flex; justify-content: center; overflow: hidden; }
.results-section { width: 100%; display: none; flex-direction: column; align-items: center; background: var(--bg-secondary); padding-bottom: 60px; }

/* --- Distant Scattered Logos --- */
.logo-icon { width: 60px; height: 60px; background-color: var(--brand-green); border-radius: 50%; position: absolute; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 15px rgba(0,0,0,0.05); z-index: 1; pointer-events: none; }
.logo-icon::after { content: 'T'; color: var(--brand-blue); font-weight: 900; font-size: 40px; font-family: sans-serif; }

.logo-1 { left: 12%; top: 15%; transform: scale(0.9) rotate(-15deg); animation: float 6s infinite alternate; }
.logo-2 { right: 15%; top: 18%; transform: scale(1.1) rotate(15deg); animation: float 5s infinite alternate-reverse; }
.logo-3 { left: 8%; bottom: 22%; transform: scale(0.7) rotate(25deg); animation: float 7s infinite alternate; opacity: 0.7; }
.logo-4 { right: 10%; bottom: 25%; transform: scale(1.2) rotate(-10deg); animation: float 8s infinite alternate-reverse; opacity: 0.8; }
.logo-5 { left: 35%; top: 10%; transform: scale(0.5) rotate(40deg); animation: float 5.5s infinite alternate; opacity: 0.5; }
.logo-6 { right: 30%; bottom: 12%; transform: scale(0.6) rotate(-20deg); animation: float 6.5s infinite alternate-reverse; opacity: 0.6; }

@keyframes float { from { transform: translateY(0); } to { transform: translateY(-25px); } }

/* --- UI Elements --- */
.ui-container { position: absolute; top: 15%; display: flex; flex-direction: column; align-items: center; gap: 20px; z-index: 10; width: 100%; }
.rainbow-heading { font-size: clamp(2.5rem, 7vw, 6rem); font-weight: 900; margin: 0; letter-spacing: -3px; text-align: center; }
.rainbow-heading span { display: inline-block; animation: rainbow-text 3s linear infinite; }
@keyframes rainbow-text { 0% { color: #ff3e3e; } 25% { color: #ffd500; } 50% { color: #00e676; } 75% { color: #2979ff; } 100% { color: #ff3e3e; } }

.input-group { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 25px; }
input[type="date"] { 
    width: 33vw; min-width: 280px; height: 75px; padding: 0 20px; 
    font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 700; 
    border: 2px solid var(--input-border); border-radius: 12px; outline: none; 
    text-align: center; background: var(--card-bg); color: var(--text-main);
    z-index: 10;
}
.error-border { border-color: var(--error-red) !important; animation: shake 0.4s ease-in-out; }
#errorMsg { color: var(--error-red); font-size: 0.85rem; font-weight: 700; display: none; margin-top: 5px; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }

.calculate-btn { margin-top: 15px; padding: 18px 65px; background: var(--text-main); color: var(--bg-primary); border-radius: 50px; font-weight: 700; text-transform: uppercase; cursor: pointer; border: none; transition: 0.3s; z-index: 10; }

/* --- Mascot --- */
.clock-container { position: absolute; bottom: 40px; width: 120px; height: 120px; z-index: 15; animation: moveAcross var(--speed) ease-in-out infinite alternate; }
.clock-body { width: 100px; height: 100px; background: #fff; border: 6px solid #ff3e3e; border-radius: 50%; position: relative; margin: 0 auto; animation: rainbow-rim 4s linear infinite; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.pupil { width: 7px; height: 7px; background: #2c3e50; border-radius: 50%; position: absolute; top: 3px; left: 3px; }
.smile { width: 32px; height: 12px; border-bottom: 3px solid #2c3e50; border-radius: 0 0 40px 40px; margin: 12px auto 0; }
@keyframes moveAcross { 0% { left: 5%; transform: rotate(-4deg); } 100% { left: calc(95% - 120px); transform: rotate(4deg); } }
@keyframes rainbow-rim { 0% { border-color: #ff3e3e; } 25% { border-color: #ffd500; } 50% { border-color: #00e676; } 75% { border-color: #2979ff; } 100% { border-color: #ff3e3e; } }

/* --- Progress Bar --- */
.progress-wrapper { background: var(--card-bg); padding: 40px; border-radius: 30px; box-shadow: 0 10px 40px rgba(0,0,0,0.03); text-align: center; border: 1px solid var(--input-border); }

.progress-flex-container {
    display: flex; align-items: center; gap: 20px; margin: 25px 0;
}

.progress-bar-container { 
    flex-grow: 1; height: 60px; background: var(--timer-bg); 
    border-radius: 100px; position: relative; 
    cursor: help; overflow: visible; 
}

.progress-fill { 
    height: 100%; width: 0%; background-color: var(--brand-green); 
    background-image: linear-gradient(-45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%); 
    background-size: 50px 50px; border-radius: 100px; 
    animation: moveWaves 2s linear infinite; transition: width 2s ease; 
}

.progress-percentage-label {
    font-size: 1.6rem; font-weight: 900; color: var(--text-main); min-width: 80px; text-align: right;
}

@keyframes moveWaves { from { background-position: 0 0; } to { background-position: 50px 50px; } }

/* --- Dashboards & Tooltips --- */
.dashboard-container { width: 90vw; max-width: 1100px; margin: 50px 0; }
.section-heading { font-size: 2.2rem; font-weight: 900; margin-bottom: 40px; border-left: 10px solid var(--brand-green); padding-left: 20px; text-align: left; }
.insight-card { background: var(--card-bg); padding: 40px; border-radius: 25px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; border: 1px solid var(--input-border); }

.planet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.planet-card { background: var(--card-bg); padding: 30px; border-radius: 20px; text-align: center; border: 1px solid var(--input-border); position: relative; cursor: help; transition: 0.3s; }
.planet-card:hover { transform: translateY(-5px); border-bottom: 4px solid var(--brand-green); }

/* Shared Tooltip styles */
[data-tooltip]:hover::after {
    content: attr(data-tooltip); position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%);
    background: #000; color: #fff; padding: 10px 20px; border-radius: 10px; font-size: 0.85rem; white-space: nowrap; z-index: 100; font-weight: 700;
}

/* --- Premium Share Buttons --- */
.share-card { background: linear-gradient(135deg, #1e1e1e 0%, #000000 100%); color: white; padding: 60px 40px; border-radius: 30px; text-align: center; position: relative; overflow: hidden; }
.share-card::after { content: 'T'; position: absolute; right: -20px; bottom: -50px; font-size: 250px; color: rgba(173, 255, 95, 0.05); font-weight: 900; pointer-events: none; }
.card-msg { font-size: 2rem; font-weight: 900; margin-bottom: 40px; }
.card-msg span { color: var(--brand-green); }

.btn-group { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-top: 35px; }

.share-btn { 
    padding: 18px 45px; border-radius: 50px; font-weight: 800; text-decoration: none; 
    cursor: pointer; border: none; font-size: 1rem; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: center; gap: 10px;
}
.share-btn:hover { transform: translateY(-5px); box-shadow: 0 15px 25px rgba(0,0,0,0.2); }
.btn-download { background: #ffffff; color: #000000; border: 1px solid #eeeeee; }
.btn-whatsapp { background: #25D366; color: #ffffff; }

/* --- Footer --- */
footer {
    display: none; /* Hidden on landing page */
    width: 100%; padding: 25px 5%; background: var(--footer-bg);
    border-top: 1px solid var(--input-border); text-align: left;
    font-size: 0.9rem; color: var(--text-muted); box-sizing: border-box;
    transition: background 0.4s, color 0.4s;
}
footer b { color: var(--text-main); }

@media (max-width: 768px) {
    input[type="date"] { width: 85vw; }
    .share-btn { width: 100%; padding: 18px 20px; }
    .logo-icon { transform: scale(0.6) !important; }
    .progress-flex-container { flex-direction: column; gap: 10px; }
    .progress-percentage-label { text-align: center; }
}