:root {
    --bg-color: #05070a;
    --accent-color: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --text-color: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --secondary-text: #94a3b8;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
.glow-text {
    font-family: 'Outfit', sans-serif;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 10;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.glow-text {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px var(--accent-glow);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--secondary-text);
    margin-top: 0.5rem;
}

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
}

/* Search Section */
.search-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.search-box {
    display: flex;
    gap: 1rem;
}

input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.primary-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.secondary-btn {
    background: transparent;
    color: white;
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #fff;
}

.divider {
    text-align: center;
    color: var(--secondary-text);
    font-size: 0.9rem;
    position: relative;
}

/* Results */
.hidden {
    display: none;
}

.results {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.visibility-card {
    text-align: center;
    margin-bottom: 1.5rem;
    border: 1px solid var(--accent-glow);
}

.probability-display {
    font-size: 5rem;
    font-weight: 800;
    margin: 1rem 0;
    font-family: 'Outfit';
    color: var(--accent-color);
}

.percent {
    font-size: 2rem;
    vertical-align: super;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.detail-card .icon {
    font-size: 2rem;
}

.times p {
    font-size: 0.9rem;
    color: var(--secondary-text);
    margin: 0.2rem 0;
}

.times span {
    color: white;
    font-weight: 600;
}

.location-info {
    text-align: center;
    color: var(--secondary-text);
    font-size: 0.85rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

/* Stars Background */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, #eee, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 160px 120px, #ddd, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.3;
    z-index: 1;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, transparent 0%, var(--bg-color) 80%);
    z-index: 2;
}

/* Chart Section */
.chart-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
}

.chart-subtitle {
    font-size: 0.85rem;
    color: var(--secondary-text);
    margin-bottom: 2rem;
    text-align: center;
}

.hourly-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 180px;
    margin-bottom: 2rem;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.chart-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 100%;
}

.chart-bar {
    width: 100%;
    background: var(--accent-glow);
    border-radius: 6px 6px 0 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.chart-bar:hover {
    filter: brightness(1.3);
    box-shadow: 0 0 15px var(--accent-glow);
}

.chart-bar.perfect {
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

.chart-bar.good {
    background: rgba(99, 102, 241, 0.6);
}

.chart-bar.moon {
    background: rgba(255, 255, 255, 0.1);
}

.bar-label {
    font-size: 0.65rem;
    color: var(--secondary-text);
    transform: rotate(-45deg);
    white-space: nowrap;
    margin-top: 15px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: var(--secondary-text);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.box {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.box.perfect {
    background: var(--accent-color);
}

.box.good {
    background: rgba(99, 102, 241, 0.6);
}

.box.moon {
    background: rgba(255, 255, 255, 0.1);
}

/* Forecast Section */
.forecast-section {
    margin-top: 1.5rem;
}

.weekly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.forecast-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.forecast-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    border-color: var(--accent-glow);
}

.forecast-date {
    font-size: 0.85rem;
    font-weight: 600;
}

.forecast-vis {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
}

.forecast-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--secondary-text);
    margin-top: 0.2rem;
}

.forecast-line span {
    color: white;
    font-weight: 500;
}

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

/* Footer */
.footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--secondary-text);
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .glow-text {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .glass {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .search-box {
        flex-direction: column;
    }

    .primary-btn {
        width: 100%;
    }

    .probability-display {
        font-size: 3.5rem;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .location-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .chart-section {
        padding: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .hourly-chart {
        min-width: 600px;
        height: 150px;
    }

    .weekly-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .forecast-card {
        padding: 1rem 0.5rem;
    }

    .forecast-vis {
        font-size: 1.25rem;
    }

    .forecast-date {
        font-size: 0.75rem;
    }

    .forecast-line {
        font-size: 0.65rem;
    }
}