/* ==========================================================================
   PinePrompts Pro - Master Design System & Stylesheet
   Modern, High-Contrast, Glassmorphism, Dual-Theme (Dark & Light)
   ========================================================================== */

/* --- CSS Variables & Theme Tokens --- */
:root {
    /* Color Palette - Dark Default */
    --bg-main: #0a0d14;
    --bg-surface: #111624;
    --bg-card: #161c2d;
    --bg-card-hover: #1c2438;
    --bg-input: #0e121d;
    
    --border-subtle: #1e2638;
    --border-focus: #3b4560;
    --border-glow: rgba(99, 102, 241, 0.35);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;

    /* Brand Accents */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-rgb: 99, 102, 241;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    
    --accent-red: #e11d48;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-cyan: #06b6d4;

    /* Shadows & Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 35px rgba(99, 102, 241, 0.22);

    /* Typography */
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    --header-height: 72px;
    --container-max: 1360px;
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f1f5f9;

    --border-subtle: #e2e8f0;
    --border-focus: #cbd5e1;
    --border-glow: rgba(99, 102, 241, 0.25);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;

    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
}

/* --- Base & Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.25s ease, color 0.25s ease;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease, opacity 0.15s ease;
}

img, svg {
    display: block;
    max-width: 100%;
}

button, input, textarea, select {
    font-family: inherit;
    color: inherit;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header & Navigation --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(17, 22, 36, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    transition: background-color 0.2s, border-color 0.2s;
}

[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.9);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

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

/* Header Search */
.header-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input {
    width: 100%;
    height: 42px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    padding: 0 42px 0 40px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-icon-left {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: none;
}

/* Header Nav Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff !important;
    padding: 9px 20px;
    border-radius: var(--radius-pill);
    font-size: 13.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    transition: all 0.18s ease;
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-outline:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-focus);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-pill);
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.18s ease;
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--primary);
    transform: rotate(15deg);
}

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
}

.hero-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 450px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.18) 0%, rgba(236, 72, 153, 0.06) 45%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-pill);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.hero-title {
    font-size: clamp(34px, 5.5vw, 64px);
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 16px;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-tagline {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto 36px;
    font-weight: 500;
}

/* Floating Prompt Snippet Cards */
.floating-card {
    position: absolute;
    width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: left;
    box-shadow: var(--shadow-md);
    z-index: 1;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.float-left-top {
    top: 70px;
    left: calc(50% - 590px);
    transform: rotate(-6deg);
    animation: bobLeft 6s ease-in-out infinite;
}

.float-right-top {
    top: 80px;
    right: calc(50% - 590px);
    transform: rotate(5deg);
    animation: bobRight 7s ease-in-out infinite;
}

@keyframes bobLeft {
    0%, 100% { transform: rotate(-6deg) translateY(0); }
    50% { transform: rotate(-5deg) translateY(-10px); }
}

@keyframes bobRight {
    0%, 100% { transform: rotate(5deg) translateY(0); }
    50% { transform: rotate(6deg) translateY(-12px); }
}

.float-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.float-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
}

.float-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.float-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Big Hero Search */
.hero-search-wrap {
    max-width: 620px;
    margin: 0 auto 26px;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-md);
    padding: 6px 8px 6px 20px;
    transition: all 0.2s ease;
}

.hero-search-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.hero-search-icon {
    color: var(--text-muted);
    margin-right: 12px;
    flex-shrink: 0;
}

.hero-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text-primary);
}

.hero-search-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 11px 26px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    transition: all 0.15s ease;
}

.hero-search-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

/* AI Model Quick Filter Pills */
.hero-models {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.model-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.model-pill:hover, .model-pill.active {
    color: var(--text-primary);
    border-color: var(--primary);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}

.model-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.model-count {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Hero Social Proof Metrics */
.hero-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13.5px;
    color: var(--text-muted);
}

.proof-avatars {
    display: flex;
    align-items: center;
}

.proof-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--bg-main);
    margin-left: -8px;
    object-fit: cover;
}

.proof-avatar:first-child { margin-left: 0; }

.proof-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -8px;
    border: 2px solid var(--bg-main);
}

/* --- Prompt of the Day Highlight Banner --- */
.potd-section {
    padding: 30px 0 10px;
}

.potd-card {
    display: flex;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(236, 72, 153, 0.04) 100%), var(--bg-card);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-glow);
    transition: all 0.25s ease;
    text-decoration: none;
}

.potd-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.25);
}

.potd-img-wrap {
    width: 320px;
    min-height: 200px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.potd-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.potd-card:hover .potd-img {
    transform: scale(1.05);
}

.potd-body {
    padding: 24px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.potd-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-red);
    margin-bottom: 8px;
}

.potd-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.potd-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.potd-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chip {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

.chip-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.potd-cta {
    margin-left: auto;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

/* --- Filter Bar: Sort Tabs & Category Slider --- */
.feed-controls {
    padding: 30px 0 20px;
}

.sort-tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
}

.sort-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 4px;
    border-radius: var(--radius-pill);
}

.sort-tab {
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sort-tab.active, .sort-tab:hover {
    color: #fff;
    background: var(--primary);
}

/* Category Slider */
.categories-slider-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.cat-slider-track {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 4px 0;
    width: 100%;
}

.cat-slider-track::-webkit-scrollbar { display: none; }

.cat-pill {
    padding: 7px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.cat-pill:hover, .cat-pill.active {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border-color: var(--border-focus);
}

.cat-pill.active {
    border-color: var(--primary);
    color: var(--primary);
}

.slider-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    flex-shrink: 0;
    z-index: 2;
    transition: all 0.15s ease;
}

.slider-arrow:hover {
    background: var(--primary);
    color: #fff;
}

/* --- Prompt Cards Grid --- */
.prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px 0 60px;
}

.prompt-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.prompt-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.4);
}

.card-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 62.5%; /* 16:10 aspect ratio */
    background: #000;
    overflow: hidden;
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.prompt-card:hover .card-img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    background: rgba(10, 13, 20, 0.85);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    z-index: 2;
}

.card-model-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    background: rgba(10, 13, 20, 0.85);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    z-index: 2;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 3;
}

.prompt-card:hover .card-overlay {
    opacity: 1;
}

.card-view-btn {
    padding: 8px 22px;
    background: #fff;
    color: #000;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--text-muted);
}

.card-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease;
}

.card-copy-btn:hover {
    color: var(--primary);
}

/* --- Prompt Detail Page --- */
.prompt-detail-page {
    padding: 40px 0 80px;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.breadcrumb-nav a:hover {
    color: var(--primary);
}

.detail-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 40px;
    align-items: start;
}

/* Left Column: Image, Stats, Feedback */
.detail-left {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-img-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.detail-img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
}

/* Stats Pills Bar */
.detail-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
}

.detail-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    gap: 2px;
}

.detail-stat-num {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

/* Interactive Actions Row */
.detail-actions-row {
    display: flex;
    gap: 10px;
}

.detail-action-btn {
    flex: 1;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.detail-action-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.detail-action-btn.active {
    color: var(--accent-red);
    border-color: rgba(225, 29, 72, 0.4);
    background: rgba(225, 29, 72, 0.08);
}

/* Right Column: Content & Actions */
.detail-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-title {
    font-size: clamp(24px, 3.2vw, 36px);
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1.25;
}

/* Full Prompt Code Box */
.prompt-box-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.prompt-box-header {
    background: var(--bg-surface);
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.prompt-text-box {
    padding: 20px;
    font-family: var(--font-sans);
    font-size: 14.5px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
    max-height: 480px;
    overflow-y: auto;
}

/* Action Buttons */
.detail-cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.copy-prompt-btn {
    flex: 1;
    min-width: 200px;
    padding: 14px 24px;
    font-size: 15px;
}

.open-model-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.open-model-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-focus);
}

/* Feedback Voting Widget */
.vote-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.vote-btns {
    display: flex;
    gap: 8px;
}

.vote-btn {
    padding: 6px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.vote-btn:hover {
    border-color: var(--primary);
}

/* Author / Creator Card */
.author-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.author-bio {
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Comments Section --- */
.comments-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-subtle);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.comment-textarea {
    width: 100%;
    min-height: 90px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 14px;
    outline: none;
    resize: vertical;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
}

/* --- Toast Notification --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: #111624;
    color: #fff;
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- Share Modal --- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.share-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.96);
    width: min(440px, calc(100vw - 32px));
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    z-index: 10001;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.share-modal.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 20px 0;
}

.share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

.share-icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.share-icon-btn:hover {
    transform: scale(1.08);
}

/* --- Footer --- */
.site-footer {
    margin-top: auto;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col-title {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Mobile Drawer Navigation --- */
.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-main);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.mobile-drawer.open {
    transform: translateX(0);
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
    .floating-card { display: none; }
    .detail-layout { grid-template-columns: 1fr; }
    .detail-left { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .header-search { display: none; }
    .nav-menu { display: none; }
    .mobile-menu-btn { display: flex; }
    .hero-title { font-size: 32px; }
    .potd-card { flex-direction: column; }
    .potd-img-wrap { width: 100%; height: 200px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
