/* --- THEME ENGINE V1: BROOKLYN MINIMALIST DARK --- */
:root {
    --bg-gradient: radial-gradient(circle at 50% 0%, #151515 0%, #000000 100%);
    --accent-blue: #3B82F6;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-muted: #9CA3AF;
}

body {
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

/* --- RELIEF COMPONENTS --- */

.relief-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: default;
}

.relief-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-blue);
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.2);
}

.hero-section {
    padding-top: 120px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    line-height: 1.1;
}

.hero-subtitle {
    max-width: 600px;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

.relief-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Pulsing Glow Animation */
@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.glow-btn {
    animation: glow-pulse 2s infinite;
    background: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    font-weight: 800;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.2s ease;
    text-decoration: none;
    font-size: 0.9rem;
}

.glow-btn:hover {
    transform: scale(1.05);
}

/* --- MICRO-FORM FOOTER --- */
.relief-footer {
    padding: 80px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 2rem;
}

.glass-pill-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    color: #fff;
    outline: none;
    width: 250px;
    transition: border-color 0.2s;
}

.glass-pill-input:focus {
    border-color: var(--accent-blue);
}

.pill-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.2s;
}

.pill-btn:hover {
    opacity: 0.9;
}

.subtle-links {
    margin-top: 3rem;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.subtle-links a {
    color: #4B5563;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.subtle-links a:hover {
    color: #fff;
}

/* --- LEGACY FUNCTIONAL ADAPTS --- */

/* Animations */
@keyframes highlightPulse {
    0% {
        background: rgba(255, 255, 255, 0.2);
    }

    100% {
        background: transparent;
    }
}

.flash-highlight {
    animation: highlightPulse 1s ease-out;
}

/* Relief Auditor Receipt */
.relief-receipt {
    background: #eeeeee;
    color: #111111;
    padding: 2.5rem 2rem;
    font-family: 'Courier Prime', 'Courier New', monospace;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    margin: 2rem auto;
    max-width: 400px;
    position: relative;
    transform: rotate(-0.5deg);
}

.relief-receipt::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -15px;
    width: 100%;
    height: 15px;
    background: linear-gradient(135deg, transparent 10px, #eeeeee 10px) top left,
        linear-gradient(225deg, transparent 10px, #eeeeee 10px) top right;
    background-size: 20px 20px;
    background-repeat: repeat-x;
}

.receipt-header {
    text-align: center;
    border-bottom: 1px dashed #444;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.receipt-header h2 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
    font-weight: 800;
}

.score-circle {
    border: 3px solid #111;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 900;
    margin: 1.5rem auto;
}

.receipt-section {
    margin-bottom: 1.5rem;
}

.receipt-section-title {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    border-bottom: 1px solid #ddd;
    margin-bottom: 0.5rem;
    display: block;
}

.receipt-item {
    font-size: 0.9rem;
    margin: 0.3rem 0;
    display: block;
}

.receipt-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.7rem;
    border-top: 1px dashed #444;
    padding-top: 1rem;
    opacity: 0.7;
}

/* History Drawer */
.glass-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 320px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 10000;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    box-sizing: border-box;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.glass-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-title {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.drawer-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.drawer-close:hover {
    opacity: 1;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.history-item-meta {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 0.3rem;
    display: flex;
    justify-content: space-between;
}

.history-item-prompt {
    font-size: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Relief Chips (AI Recommendations) */
.relief-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #000;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    margin: 0.5rem 0;
    transition: all 0.2s;
    border: 1px solid #333;
}

.relief-chip:hover {
    background: #222;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Freemium & Upsell */
.upsell-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    text-align: center;
    padding: 2.5rem 1.5rem;
    margin-top: 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.upsell-card:hover {
    border-color: #fff;
    transform: translateY(-2px);
}

.upsell-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: block;
}

.upsell-title {
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 0.5rem;
}

.upsell-subtitle {
    font-size: 0.7rem;
    opacity: 0.6;
    display: block;
}

/* Locked History Card */
.locked-history-card {
    position: relative;
    margin-top: 1rem;
    border-radius: 4px;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.95));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    z-index: 10;
}

/* Upgrade Modal */
.upgrade-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.upgrade-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.upgrade-modal {
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4rem 2rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    border-radius: 4px;
}

.upgrade-modal .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.5;
}

.upgrade-modal h2 {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1.5rem;
}

.upgrade-modal p {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.7;
    margin-bottom: 2.5rem;
}

.subscribe-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 1rem 3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.subscribe-btn:hover {
    transform: scale(1.05);
}

@keyframes pulse-unlock {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.unlock-pulse {
    animation: pulse-unlock 2s infinite ease-in-out;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .glass-drawer {
        width: 100%;
    }

    .relief-grid {
        grid-template-columns: 1fr;
    }

    .footer-form {
        flex-direction: column;
        align-items: center;
    }

    .glass-pill-input {
        width: 100%;
        max-width: 300px;
    }
}

/* Storyvibe Shot Cards */
.shot-card {
    min-width: 320px;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #111, #222);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.shot-card:hover {
    transform: translateY(-5px);
}

.shot-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 900;
    opacity: 0.05;
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
    color: #fff;
    z-index: 1;
}

.shot-content {
    z-index: 2;
    position: relative;
    color: #fff;
}

.audio-pill {
    font-size: 0.7rem;
    color: #999;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}