/* ========================================================================
   FLUENT 2099 — HOLOGRAPHIC GLASS OS THEME
   A futuristic UI system: glass, neon edges, soft motion, OS-like panels.
========================================================================= */

/* -----------------------------------------------------
   1. ROOT VARIABLES — COLOR, DEPTH, MOTION
----------------------------------------------------- */
:root {
    /* Core holographic palette */
    --accent: #22d3ee;                 /* neon cyan */
    --accent-hover: #38bdf8;           /* bright sky */
    --accent-soft: rgba(34,211,238,0.16);

    --accent-secondary: #a855f7;       /* holographic violet */
    --accent-secondary-soft: rgba(168,85,247,0.18);

    /* Foregrounds */
    --fg: #e5e7eb;
    --fg-muted: #9ca3af;
    --fg-soft: #6b7280;

    /* Backgrounds — layered space glass */
    --bg: radial-gradient(circle at top,
            #020617 0,
            #020617 40%,
            #020617 100%);
    --bg-solid: #020617;
    --bg-alt: #020617;

    /* Surfaces */
    --card-bg: rgba(15,23,42,0.78);
    --card-bg-soft: rgba(15,23,42,0.6);
    --card-border: rgba(148,163,184,0.35);

    /* Geometry */
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 26px;
    --radius-xl: 32px;

    /* Shadows & glow */
    --shadow-soft: 0 18px 45px rgba(15,23,42,0.85);
    --shadow-strong: 0 30px 80px rgba(15,23,42,0.95);
    --glow-cyan: 0 0 32px rgba(34,211,238,0.65);
    --glow-violet: 0 0 32px rgba(168,85,247,0.6);

    /* Blur & motion */
    --blur-strong: blur(26px) saturate(220%);
    --blur-soft: blur(16px) saturate(180%);
    --transition-fast: 0.16s ease-out;
    --transition: 0.24s ease;
    --transition-slow: 0.4s ease;

    /* Layout */
    --content-width: 980px;
    --grid-gap: 28px;
}

/* -----------------------------------------------------
   2. RESET & GLOBAL
----------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
* {
    max-width: 100%;
    box-sizing: border-box;
}
html, body {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: "Segoe UI Variable", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at 50% 0%, #0ea5e9 0%, #020617 60%);
    background-attachment: fixed;
    background-size: 140% 140%;
    color: var(--fg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    transition: background-position 0.2s ease-out;
}

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

/* -----------------------------------------------------
   3. SCROLLBARS — GLASS EDGE
----------------------------------------------------- */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: rgba(15,23,42,0.9);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #22d3ee, #a855f7);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #38bdf8, #c084fc);
}

/* -----------------------------------------------------
   4. APP SHELL — TOP BAR & HEADER
----------------------------------------------------- */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top system bar (like OS chrome) */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 10px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: var(--blur-soft);
    background: linear-gradient(
        90deg,
        rgba(15,23,42,0.92),
        rgba(15,23,42,0.86),
        rgba(15,23,42,0.92)
    );
    border-bottom: 1px solid rgba(148,163,184,0.35);
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.top-bar-logo {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: radial-gradient(circle, #22d3ee, #0ea5e9);
    box-shadow: var(--glow-cyan);
}

.top-bar-title {
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-soft);
}

/* Header hero */
header {
    position: relative;
    padding: 90px 20px 70px;
    text-align: center;
    overflow: hidden;
}

/* Holographic gradient background */
header::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 10% 0%, rgba(56,189,248,0.18), transparent 55%),
        radial-gradient(circle at 90% 0%, rgba(168,85,247,0.22), transparent 55%),
        radial-gradient(circle at 50% 100%, rgba(59,130,246,0.18), transparent 55%);
    opacity: 1;
    pointer-events: none;
}

/* Glass overlay */
header::after {
    content: "";
    position: absolute;
    inset: 0;
    backdrop-filter: var(--blur-strong);
    background: radial-gradient(circle at top, rgba(15,23,42,0.35), rgba(15,23,42,0.9));
    opacity: 0.9;
    pointer-events: none;
}

header > * {
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: clamp(40px, 5vw, 56px);
    margin-bottom: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

header h1 span.accent {
    background: linear-gradient(120deg, #22d3ee, #a855f7, #38bdf8);
    -webkit-background-clip: text;
    color: transparent;
}

header p {
    font-size: 20px;
    max-width: 640px;
    margin: 0 auto;
    color: var(--fg-muted);
}

/* -----------------------------------------------------
   5. NAVIGATION — FLOATING GLASS TABS
----------------------------------------------------- */
nav {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 18px;
}

.nav-pill {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.4);
    background: radial-gradient(circle at top left,
        rgba(34,211,238,0.16),
        rgba(15,23,42,0.9)
    );
    color: var(--fg-muted);
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-fast);
    backdrop-filter: var(--blur-soft);
}

.nav-pill:hover,
.nav-pill.active {
    color: var(--fg);
    border-color: rgba(34,211,238,0.7);
    box-shadow: var(--glow-cyan);
}

/* -----------------------------------------------------
   6. MAIN CONTENT & SECTIONS
----------------------------------------------------- */
main {
    flex: 1;
}

section {
    max-width: var(--content-width);
    margin: 60px auto;
    padding: 0 20px;
}

h2 {
    font-size: 30px;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--fg);
}

h2 span {
    background: linear-gradient(120deg, #22d3ee, #a855f7);
    -webkit-background-clip: text;
    color: transparent;
}

h3 {
    font-size: 22px;
    margin-top: 32px;
    margin-bottom: 8px;
    color: var(--fg);
    font-weight: 500;
}

p {
    color: var(--fg-muted);
    margin-bottom: 10px;
}

/* -----------------------------------------------------
   7. GRID & LAYOUT UTILITIES
----------------------------------------------------- */
.grid {
    display: grid;
    gap: var(--grid-gap);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* -----------------------------------------------------
   8. GLASS CARDS & DEMO BOX
----------------------------------------------------- */
.card,
.demo-box {
    position: relative;
    padding: 26px;
    border-radius: var(--radius-lg);
    background: linear-gradient(
        145deg,
        rgba(15,23,42,0.92),
        rgba(15,23,42,0.82)
    );
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-soft);
    backdrop-filter: var(--blur-soft);
    overflow: hidden;
    transition: var(--transition);
}

/* Subtle inner holographic sheen */
.card::before,
.demo-box::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0% 0%, rgba(34,211,238,0.12), transparent 55%),
        radial-gradient(circle at 100% 0%, rgba(168,85,247,0.12), transparent 55%);
    opacity: 0;
    transition: var(--transition-slow);
    pointer-events: none;
}

.card:hover,
.demo-box:hover {
    transform: translateY(-4px);
    border-color: rgba(34,211,238,0.7);
    box-shadow: var(--shadow-strong), var(--glow-cyan);
}

.card:hover::before,
.demo-box:hover::before {
    opacity: 1;
}

.demo-box {
    min-height: 200px;
}

/* -----------------------------------------------------
   9. BUTTONS — GLASS CONTROLS
----------------------------------------------------- */
button,
.btn {
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148,163,184,0.5);
    background: radial-gradient(circle at top left,
        rgba(34,211,238,0.18),
        rgba(15,23,42,0.96)
    );
    color: var(--fg);
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition-fast);
    backdrop-filter: var(--blur-soft);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

button:hover,
.btn:hover {
    border-color: rgba(34,211,238,0.9);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

button:active,
.btn:active {
    transform: translateY(0) scale(0.98);
}

/* Secondary button */
.btn-secondary {
    background: radial-gradient(circle at top left,
        rgba(168,85,247,0.18),
        rgba(15,23,42,0.96)
    );
    border-color: rgba(168,85,247,0.7);
}

.btn-secondary:hover {
    box-shadow: var(--glow-violet);
}

/* -----------------------------------------------------
   10. FORMS — INPUTS & FIELDS
----------------------------------------------------- */
label {
    display: block;
    font-size: 14px;
    color: var(--fg-soft);
    margin-bottom: 6px;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148,163,184,0.45);
    background: rgba(15,23,42,0.9);
    color: var(--fg);
    font-size: 15px;
    transition: var(--transition-fast);
    backdrop-filter: var(--blur-soft);
}

input::placeholder,
textarea::placeholder {
    color: var(--fg-soft);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(34,211,238,0.9);
    box-shadow: 0 0 0 1px rgba(34,211,238,0.7), var(--glow-cyan);
}

/* -----------------------------------------------------
   11. LINKS
----------------------------------------------------- */
a {
    color: var(--accent-hover);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* -----------------------------------------------------
   12. LISTS
----------------------------------------------------- */
ul {
    margin-left: 22px;
    color: var(--fg-muted);
}

ul li {
    margin-bottom: 6px;
}

/* -----------------------------------------------------
   13. CODE BLOCKS — TERMINAL GLASS
----------------------------------------------------- */
pre {
    background: radial-gradient(circle at top left,
        rgba(15,23,42,0.98),
        rgba(15,23,42,0.94)
    );
    color: #e5e7eb;
    padding: 18px 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 14px;
    border: 1px solid rgba(148,163,184,0.45);
    box-shadow: inset 0 0 0 1px rgba(15,23,42,0.9);
}

/* -----------------------------------------------------
   14. TABLES — DATA PANELS
----------------------------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
    background: rgba(15,23,42,0.9);
    border-radius: var(--radius);
    overflow: hidden;
    backdrop-filter: var(--blur-soft);
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(30,64,175,0.5);
    font-size: 14px;
}

th {
    text-align: left;
    background: linear-gradient(90deg,
        rgba(15,23,42,0.98),
        rgba(15,23,42,0.9)
    );
    color: var(--fg-soft);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
}

tr:hover td {
    background: rgba(15,23,42,0.96);
}

/* -----------------------------------------------------
   15. MODALS — FLOATING WINDOWS
----------------------------------------------------- */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top,
        rgba(15,23,42,0.9),
        rgba(15,23,42,0.98)
    );
    backdrop-filter: blur(18px);
    z-index: 100;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: min(90%, 520px);
    padding: 30px;
    border-radius: var(--radius-xl);
    background: linear-gradient(
        145deg,
        rgba(15,23,42,0.96),
        rgba(15,23,42,0.9)
    );
    border: 1px solid rgba(148,163,184,0.5);
    box-shadow: var(--shadow-strong), var(--glow-cyan);
    animation: modalIn var(--transition-slow);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* -----------------------------------------------------
   16. TOOLTIP — MICRO GLASS LABELS
----------------------------------------------------- */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    background: rgba(15,23,42,0.96);
    border: 1px solid rgba(148,163,184,0.6);
    color: var(--fg);
    font-size: 12px;
    white-space: nowrap;
    backdrop-filter: var(--blur-soft);
    box-shadow: var(--shadow-soft);
}

/* -----------------------------------------------------
   17. ANIMATIONS & EFFECT UTILITIES
----------------------------------------------------- */
@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}

.float {
    animation: float 5s ease-in-out infinite;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(34,211,238,0.5);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(34,211,238,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34,211,238,0);
    }
}

.pulse {
    animation: pulse-ring 2.4s infinite;
}

/* -----------------------------------------------------
   18. FOOTER
----------------------------------------------------- */
footer {
    text-align: center;
    padding: 40px 20px 50px;
    color: var(--fg-soft);
    font-size: 14px;
}

/* -----------------------------------------------------
   19. RESPONSIVE TWEAKS
----------------------------------------------------- */
@media (max-width: 640px) {
    header {
        padding-top: 70px;
        padding-bottom: 50px;
    }

    nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .top-bar {
        padding-inline: 16px;
    }

    section {
        margin: 40px auto;
    }
}
/* LIQUID GLASS PRE — BASE */
pre {
    position: relative;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(22px) saturate(220%);
    box-shadow:
        inset 0 0 40px rgba(255,255,255,0.06),
        0 12px 40px rgba(0,0,0,0.45);
    overflow: hidden;
    transition: 0.35s ease;
}
/* LIQUID FLOW ANIMATION */
pre::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255,255,255,0.18),
        transparent 60%
    );
    animation: liquidFlow 14s ease-in-out infinite;
    opacity: 0.35;
    pointer-events: none;
}

@keyframes liquidFlow {
    0%   { transform: translate(0,0) scale(1); }
    50%  { transform: translate(12%, -8%) scale(1.15); }
    100% { transform: translate(0,0) scale(1); }
}
/* LED EDGE LIGHTING */
pre::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(
        135deg,
        rgba(34,211,238,0.0),
        rgba(34,211,238,0.0),
        rgba(168,85,247,0.0)
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: 0.4s ease;
    pointer-events: none;
}

pre:hover::after {
    background: linear-gradient(
        135deg,
        rgba(34,211,238,0.9),
        rgba(168,85,247,0.9)
    );
    box-shadow:
        0 0 18px rgba(34,211,238,0.6),
        0 0 28px rgba(168,85,247,0.6);
}

/* UNIVERSAL LIQUID TEXT — NO WEBKIT MASK */
.liquid-text,
h1, h2, h3, h4, h5, h6,
p, span, a, li, label,
strong, b, em, i, button {
    position: relative;
    display: inline-block;
    color: transparent;
    background: linear-gradient(120deg, #ffffff, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    cursor: pointer;
    transition: 0.3s ease;
}

/* LIQUID LAYER — uses blend mode instead of mask */
.liquid-text::before,
h1::before, h2::before, h3::before, h4::before, h5::before, h6::before,
p::before, span::before, a::before, li::before, label::before,
strong::before, b::before, em::before, i::before, button::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        #f472b6,
        #ec4899,
        #d946ef,
        #a855f7
    );
    background-size: 300% 300%;
    mix-blend-mode: screen;
    opacity: 0;
    filter: brightness(0.4);
    transition: opacity 0.3s ease, filter 0.3s ease;
    pointer-events: none;
}

/* INJECT LIQUID */
.inject::before {
    opacity: 1;
    animation: liquidFill 1.8s ease forwards;
    filter: brightness(1.4);
}

@keyframes liquidFill {
    0%   { background-position: 0% 100%; }
    50%  { background-position: 100% 0%; }
    100% { background-position: 50% 50%; }
}

/* DRAIN LIQUID */
.drain::before {
    opacity: 0;
    animation: liquidDrain 1.2s ease-out forwards;
    filter: brightness(0.4);
}

@keyframes liquidDrain {
    0%   { background-position: 50% 50%; opacity: 1; }
    100% { background-position: 0% 100%; opacity: 0; }
}

/* RIPPLE EFFECT */
.inject::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(255,255,255,0.25),
        transparent 70%
    );
    mix-blend-mode: overlay;
    animation: ripple 0.9s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple {
    0% { transform: scale(0.4); opacity: 0.8; }
    70% { transform: scale(1.6); opacity: 0.2; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* HOLOGRAPHIC GLASS SECTIONS */
section {
    position: relative;
    max-width: 980px;
    margin: 80px auto;
    padding: 50px 40px;
    border-radius: 28px;

    background: rgba(15,23,42,0.55);
    backdrop-filter: blur(28px) saturate(220%);
    border: 1px solid rgba(255,255,255,0.12);

    box-shadow:
        0 20px 60px rgba(0,0,0,0.55),
        inset 0 0 40px rgba(255,255,255,0.04);

    transition: 0.45s ease;
}

/* HOLOGRAPHIC SHEEN */
section::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 20% 0%, rgba(34,211,238,0.18), transparent 60%),
        radial-gradient(circle at 80% 0%, rgba(168,85,247,0.18), transparent 60%);
    opacity: 0.35;
    animation: holoShift 14s ease-in-out infinite;
    pointer-events: none;
}

@keyframes holoShift {
    0%   { transform: translate(0,0) scale(1); }
    50%  { transform: translate(8%, -6%) scale(1.15); }
    100% { transform: translate(0,0) scale(1); }
}

/* LED EDGE LIGHTING */
section:hover {
    border-color: rgba(34,211,238,0.8);
    box-shadow:
        0 0 22px rgba(34,211,238,0.55),
        0 0 44px rgba(168,85,247,0.45),
        0 20px 60px rgba(0,0,0,0.65);
    transform: translateY(-6px);
}

/* LIQUID CORNER GLOW */
section::after {
    content: "";
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle,
        rgba(34,211,238,0.35),
        transparent 70%
    );
    filter: blur(22px);
    opacity: 0.4;
    transition: 0.4s ease;
    pointer-events: none;
}

section:hover::after {
    opacity: 0.7;
    filter: blur(28px);
}

/* HOLOGRAPHIC DIVIDER */
section .divider {
    height: 1px;
    margin: 40px 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.25),
        transparent
    );
    filter: blur(0.5px);
}

/* SECTION TITLES — HOLOGRAPHIC */
section h2 {
    font-size: 32px;
    margin-bottom: 20px;
    background: linear-gradient(120deg, #22d3ee, #a855f7);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow:
        0 0 12px rgba(34,211,238,0.55),
        0 0 22px rgba(168,85,247,0.45);
}

section:hover {
    animation: sectionPulse 0.8s ease-out;
}

@keyframes sectionPulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* SECTION DEPTH SHIFT */
section {
    transform-style: preserve-3d;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

section.in-view {
    transform: perspective(900px) translateZ(40px);
    box-shadow:
        0 0 30px rgba(34,211,238,0.4),
        0 0 60px rgba(168,85,247,0.3);
}

/* HOLOGRAM LIGHT SWEEP */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,0.05),
        transparent
    );
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.sweep::after {
    opacity: 1;
}

/* SCROLL GLOW */
body.scrolling {
    filter: drop-shadow(0 0 12px rgba(34,211,238,0.4));
    transition: filter 0.3s ease-out;
}

/* END — FLUENT 2099 HOLOGRAPHIC GLASS OS */
