@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=JetBrains+Mono:wght@400;700&family=Outfit:wght@300;400;700&display=swap');

:root {
    /* Default: Cyberpunk */
    --bg-main: #050505;
    --bg-panel: rgba(10, 10, 15, 0.7);
    --text-main: #e0e0e0;
    --text-muted: #888888;
    --accent-primary: #00f3ff;
    --accent-secondary: #ff00ff;
    --border-color: rgba(0, 243, 255, 0.3);
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --glow-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    --glass-blur: blur(12px);
    --player-bg: #000;
}

[data-theme="hacker"] {
    --bg-main: #000000;
    --bg-panel: #050505;
    --text-main: #00ff41;
    --text-muted: #008f11;
    --accent-primary: #00ff41;
    --accent-secondary: #00ff41;
    --border-color: #00ff41;
    --font-heading: 'Courier New', monospace;
    --font-mono: 'Courier New', monospace;
    --glow-shadow: none;
    --glass-blur: none;
    --player-bg: #000;
}

[data-theme="nature"] {
    --bg-main: #f4f1ea;
    --bg-panel: #ffffff;
    --text-main: #2c3e2e;
    --text-muted: #7a8b7c;
    --accent-primary: #4a7c59;
    --accent-secondary: #c8d5b9;
    --border-color: #d1d8d3;
    --font-heading: 'Inter', sans-serif;
    --font-mono: 'Courier New', monospace;
    --glow-shadow: 0 4px 20px rgba(0,0,0,0.05);
    --glass-blur: blur(5px);
    --player-bg: #e8e4db;
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-heading);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ── NAVBAR ── */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.4s ease;
}

.logo {
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 2px;
    color: var(--text-main);
    text-shadow: var(--glow-shadow);
}

.logo span {
    color: var(--accent-primary);
}

/* ── THEME SWITCHER (Mini in Navbar) ── */
.theme-switcher-mini {
    display: flex;
    gap: 10px;
}
.theme-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}
.theme-btn:hover, .theme-btn.active {
    background: var(--accent-primary);
    color: var(--bg-main);
    box-shadow: var(--glow-shadow);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.nav-btn:hover {
    color: var(--accent-primary);
    text-shadow: var(--glow-shadow);
}

/* ── LANDING PAGE LAYOUT ── */
.landing-page {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ── HERO SECTION ── */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1400px;
    margin: 80px auto;
    padding: 0 40px;
    min-height: 70vh;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge {
    background: rgba(0, 243, 255, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 24px;
    box-shadow: var(--glow-shadow);
}

.hero-content h1 {
    font-size: clamp(48px, 6vw, 72px);
    line-height: 1.1;
    margin: 0 0 24px 0;
    text-shadow: var(--glow-shadow);
    letter-spacing: -1px;
}

.hero-content h1 span {
    color: var(--accent-primary);
}

.hero-content p {
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.cta-group {
    display: flex;
    gap: 20px;
}

.cta-primary, .cta-secondary {
    padding: 16px 32px;
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-primary {
    background: var(--accent-primary);
    color: var(--bg-main);
    border: none;
    box-shadow: var(--glow-shadow);
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--accent-primary);
}

.cta-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-main);
}

.hero-player-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── VIBE SELECTOR (SHOWCASE TABS) ── */
.vibe-selector {
    display: flex;
    gap: 10px;
    background: var(--bg-panel);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 5px;
    backdrop-filter: var(--glass-blur);
}

.vibe-tab {
    flex: 1;
    text-align: center;
    padding: 10px 15px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 13px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.vibe-tab:hover {
    color: var(--text-main);
    background: rgba(128, 128, 128, 0.1);
}

.vibe-tab.active {
    color: var(--bg-main);
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: var(--glow-shadow);
    font-weight: bold;
}

/* ── PREMIUM FX PANEL ── */
.fx-panel-premium {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.fx-title {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 12px;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 8px;
}

/* ── FEATURES SECTION ── */
.features-section {
    background: var(--bg-panel);
    padding: 100px 40px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.features-section h2 {
    font-size: 42px;
    margin-bottom: 60px;
    color: var(--accent-primary);
    text-shadow: var(--glow-shadow);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 40px;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-color);
}

.feature-card .icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── PRICING SECTION ── */
.pricing-section {
    padding: 100px 40px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-section h2 {
    font-size: 42px;
    margin-bottom: 60px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.price-card {
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 50px 30px;
    border-radius: 16px;
    position: relative;
    backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
}

.price-card.premium {
    border-color: var(--accent-primary);
    box-shadow: var(--glow-shadow);
    transform: scale(1.05);
}

.price-card .tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary);
    color: var(--bg-main);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}

.price-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.price-card .price {
    font-size: 56px;
    font-weight: bold;
    margin-bottom: 30px;
    color: var(--text-main);
}

.price-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    text-align: left;
    flex-grow: 1;
}

.price-card ul li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
}

.price-card ul li::before {
    content: '→';
    color: var(--accent-primary);
    margin-right: 10px;
}

.buy-btn {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.price-card.premium .buy-btn, .buy-btn:hover {
    background: var(--text-main);
    color: var(--bg-main);
}

/* ── FX PANEL (Mini Layout) ── */
.fx-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.fx-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.fx-btn:hover, .fx-btn.active {
    background: var(--accent-primary);
    color: var(--bg-main);
    box-shadow: var(--glow-shadow);
}

/* ── FX VISUAL CLASSES (From User's Code) ── */

/* PLASMA WARP (Ripple/Water) */
.widget-player.fx-plasma .ascii-canvas,
.widget-player.fx-plasma .ascii-player {
    filter: url(#plasma-filter);
}

/* SHRED */
.widget-player.fx-shred {
    animation: shred-clip 3.5s ease-in-out infinite;
    overflow: hidden;
}
@keyframes shred-clip {
    0%   { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    15%  { clip-path: polygon(0 0, 96% 3%, 100% 100%, 4% 96%); }
    30%  { clip-path: polygon(3% 0, 100% 2%, 97% 100%, 0 97%); }
    50%  { clip-path: polygon(0 4%, 98% 0, 100% 96%, 2% 100%); }
    70%  { clip-path: polygon(2% 0, 100% 3%, 98% 100%, 0 98%); }
    85%  { clip-path: polygon(0 0, 97% 4%, 100% 97%, 3% 100%); }
    100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
}

/* CHROME (Color Drift) */
.widget-player.fx-chrome .ascii-canvas,
.widget-player.fx-chrome .ascii-player {
    animation: chrome-drift 10s linear infinite;
}
@keyframes chrome-drift {
    from { filter: sepia(1) saturate(5) hue-rotate(0deg); }
    to   { filter: sepia(1) saturate(5) hue-rotate(360deg); }
}

/* HOLE (Singularity) */
.widget-player.fx-hole::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 30% 40% at 50% 50%, transparent 40%, rgba(5, 0, 12, 0.55) 100%);
    pointer-events: none;
    z-index: 10;
    animation: hole-breathe 3.2s ease-in-out infinite;
}
@keyframes hole-breathe {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* WATER DROP (Pure CSS Hollow Glass Ring) */
@property --mag-r {
    syntax: '<length>';
    initial-value: 0px;
    inherits: false;
}

.widget-player.fx-waterdrop::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    border-radius: 50%;
    
    /* The ring's visible color and glow */
    border: 40px solid rgba(0, 243, 255, 0.15);
    box-shadow: inset 0 0 30px rgba(0, 243, 255, 0.4), 0 0 30px rgba(0, 243, 255, 0.4);
    
    /* Hollow out the center so distortion ONLY happens on the border */
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    /* The optical illusion: blur and contrast creates a strong lens effect natively */
    backdrop-filter: blur(8px) contrast(3) saturate(1.5) brightness(1.2);
    -webkit-backdrop-filter: blur(8px) contrast(3) saturate(1.5) brightness(1.2);

    /* Bind physical size to --mag-r */
    width: calc(var(--mag-r) * 2);
    height: calc(var(--mag-r) * 2);

    /* 3 second loop */
    animation: shockwaveSync 3s infinite ease-out;
    pointer-events: none;
    z-index: 20;
}

@keyframes shockwaveSync {
    0% {
        --mag-r: 0px;
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    100% {
        --mag-r: 1200px;
        opacity: 0;
    }
}



/* ── WIDGET SIDEBAR ── */
.blog-sidebar {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--glow-shadow);
    height: fit-content;
}

.widget-title {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* ── PLAYER STYLES (Widget Sized) ── */
.widget-player {
    position: relative;
    background: var(--player-bg);
    border-radius: 4px;
    width: 100%;
    aspect-ratio: 16 / 9; /* Automatically scales height based on width */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
}

.ascii-player {
    font-family: var(--font-mono);
    white-space: pre;
    overflow: hidden;
    font-size: 8px;
    line-height: 8px;
    font-weight: 400; /* Reduced from bold to prevent optical bloat on bright colors */
    letter-spacing: 0.02em; /* Micro-spacing to separate dense characters */
    color: transparent; /* Handled in JS for Pixel mode, overridden below */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: auto;
    display: none;
    user-select: text;
    margin: 0;
}

.ascii-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: none;
}

.play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10;
    cursor: pointer;
}
.play-overlay.hidden { display: none; }

.play-btn {
    width: 60px; height: 60px;
    border: 3px solid var(--accent-primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 15px;
    box-shadow: var(--glow-shadow);
}
.play-btn::after {
    content: ''; display: block;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent var(--accent-primary);
    margin-left: 5px;
}
.play-label {
    color: var(--text-main);
    font-family: var(--font-mono);
    letter-spacing: 2px;
}

.status {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-primary);
    margin-top: 15px;
}

/* ── ANIMATIONS ── */
@keyframes pause-tremble {
    0%, 100% { transform: translate(0, 0); }
    15%  { transform: translate(-1px, 1px); }
    35%  { transform: translate(1px, -1px); }
    55%  { transform: translate(-1px, -1px); }
    75%  { transform: translate(1px, 1px); }
}

.widget-player.paused, .bg-player.paused {
    filter: saturate(0.35) brightness(0.65) contrast(1.15);
    cursor: pointer;
    animation: pause-tremble 0.12s steps(3) infinite;
}
.widget-player.paused .ascii-player, .bg-player.paused .ascii-player { pointer-events: none; }
