/* ══════════════════════════════════════════════════════════════════════════════
   ALTITUDZ — Minimal CSS (Tailwind + DaisyUI handles the rest)
   Only: constellation canvas, custom animations, noise/glow overlays, chart bars
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Smooth scroll ── */
html {
    scroll-behavior: smooth;
}

/* ── Constellation canvas ── */
.constellation-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.constellation-bg canvas {
    width: 100%;
    height: 100%;
}

/* ── Hero section background ── */
.hero {
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(16, 185, 129, 0.06), transparent 70%),
        radial-gradient(ellipse 40% 50% at 80% 20%, rgba(16, 185, 129, 0.04), transparent),
        #0a0f1a;
}

/* Topographic lines overlay */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-conic-gradient(
            rgba(16, 185, 129, 0.02) 0deg,
            transparent 1deg,
            transparent 60deg
        );
    background-size: 120px 120px;
    opacity: 0.4;
    z-index: 0;
    animation: topo-drift 60s linear infinite;
    pointer-events: none;
}

@keyframes topo-drift {
    to { background-position: 120px 120px; }
}

/* ── Gradient text ── */
.gradient-text {
    background: linear-gradient(135deg, #10b981, #34d399, #6ee7b7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Noise overlay ── */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(16, 185, 129, 0.04), transparent 70%),
        radial-gradient(ellipse 50% 50% at 0% 50%, rgba(16, 185, 129, 0.02), transparent),
        radial-gradient(ellipse 50% 50% at 100% 80%, rgba(52, 211, 153, 0.02), transparent);
}

/* ── Fade-up animation (used by animations.js) ── */
.fade-up {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Hero animations ── */
.animate-fade-down {
    animation: fade-down 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-fade-up {
    animation: fade-up-hero 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animation-delay-150 {
    animation-delay: 0.15s;
}

.animation-delay-300 {
    animation-delay: 0.3s;
}

@keyframes fade-up-hero {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-down {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Glassmorphism card utility ── */
.glass-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ── Analytics: Chart Bars ── */
.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    height: 180px;
    padding-top: 1rem;
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.chart-bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.chart-bar {
    width: 100%;
    max-width: 48px;
    min-height: 8px;
    background: linear-gradient(180deg, #10b981, rgba(16, 185, 129, 0.3));
    border-radius: 6px 6px 0 0;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-bar:hover {
    background: linear-gradient(180deg, #34d399, #10b981);
}

.chart-bar-tooltip {
    position: absolute;
    top: -1.75rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: #10b981;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.chart-bar:hover .chart-bar-tooltip {
    opacity: 1;
}

.chart-bar-label {
    margin-top: 0.5rem;
    font-size: 0.65rem;
    color: #475569;
    text-align: center;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0f1a; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ── Selection ── */
::selection {
    background: rgba(16, 185, 129, 0.25);
    color: #f1f5f9;
}

/* ── DaisyUI theme override for table backgrounds ── */
[data-theme="night"] .table {
    --tw-bg-opacity: 0;
}

[data-theme="night"] .table th {
    background: transparent;
}

/* ── Stats horizontal responsive ── */
@media (max-width: 640px) {
    .stats-horizontal {
        flex-direction: column;
    }
    .stats-horizontal .stat {
        border-bottom: 1px solid rgba(16, 185, 129, 0.1);
        border-left: none;
    }
}
