/*
    =================================================================
    STYLE LAB - COMPLETE STYLESHEET (V3)
    -----------------------------------------------------------------
    Author: [Your Name]
    Version: 3.0
    Description: A comprehensive, premium stylesheet for the Style
                 Lab website, including the main tool, static pages,
                 and a dynamic hero section.
    =================================================================

    TABLE OF CONTENTS
    -----------------
    1.  ROOT & THEME VARIABLES
        - Color Palette
        - Typography & Sizing
        - Shadows & Transitions
    2.  GLOBAL RESETS & BASE STYLES
        - Body & HTML
        - Headings, Paragraphs, Links
        - Custom Scrollbar
    3.  REUSABLE COMPONENTS
        - Buttons
        - Badges & Pills
    4.  SITE-WIDE LAYOUT & COMPONENTS
        - Top Bar
        - Main Navigation (Navbar)
        - Footer
    5.  PAGE-SPECIFIC: HOMEPAGE (INDEX)
        - Dynamic Hero Section
        - Hero Text Animation
        - Main Tool (#tool)
        - Input/Output Panels
        - Results List Styling
    6.  PAGE-SPECIFIC: STATIC CONTENT PAGES
        - Prose Container for Readability
        - Specific Element Styling
    7.  UTILITY & HELPER CLASSES
        - Spacing, Text, etc.
    8.  ANIMATIONS & KEYFRAMES
        - Fade-in, Slide-up
    9.  RESPONSIVE MEDIA QUERIES
        - Tablet, Mobile adjustments

*/


/*
=================================================================
1. ROOT & THEME VARIABLES
=================================================================
*/
:root {
    /* Color Palette - Modern Dark Theme */
    --color-primary: #5865f2;         /* A vibrant, Discord-like blue/purple */
    --color-primary-hover: #4752c4;
    --color-success: #22c55e;
    --color-success-hover: #16a34a;
    --color-text: #e2e8f0;             /* Off-white (Slate 200) */
    --color-text-muted: #94a3b8;        /* Muted gray (Slate 400) */
    --color-text-heading: #f8fafc;     /* Brightest white (Slate 50) */

    --color-bg-deep: #0f172a;          /* Deepest blue/black (Slate 900) */
    --color-bg-dark: #1e293b;          /* Main dark background (Slate 800) */
    --color-bg-panel: #334155;         /* Panel background (Slate 700) */
    --color-bg-panel-light: #475569;  /* Lighter panel for hover (Slate 600) */
    --color-border: #475569;           /* Border color (Slate 600) */
    --color-border-focus: var(--color-primary);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-monospace: 'Fira Code', 'Courier New', monospace; /* For styled text if needed */

    /* Sizing & Spacing */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --container-width: 1140px;
    --nav-height: 70px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --shadow-inset: inset 0 2px 4px 0 rgba(0, 0, 0, 0.2);

    /* Transitions */
    --transition-fast: all 0.2s ease-in-out;
    --transition-slow: all 0.4s ease-in-out;
}


/*
=================================================================
2. GLOBAL RESETS & BASE STYLES
=================================================================
*/
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 2rem);
}

body {
    background-color: var(--color-bg-deep);
    color: var(--color-text);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-heading);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}

h1.display-5 { font-weight: 700; }
.lead {
    color: #fff !important;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text);
}

a, a:hover, a:focus {
    color: var(--color-primary);
    text-decoration: none !important;
    transition: var(--transition-fast);
}

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

strong {
    color: var(--color-text-heading);
    font-weight: 600;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-dark);
}

::-webkit-scrollbar-thumb {
    background-color: var(--color-bg-panel-light);
    border-radius: 10px;
    border: 3px solid var(--color-bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background-color: #64748b; /* Slate 500 */
}

/*
=================================================================
3. REUSABLE COMPONENTS
=================================================================
*/

/* Custom Button Styles */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    color: var(--color-primary);
    border-color: var(--color-primary);
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}


/*
=================================================================
4. SITE-WIDE LAYOUT & COMPONENTS
=================================================================
*/

/* --- Top Bar --- */
.top-bar {
    background: linear-gradient(270deg, #181920, #23243a, #10111a, #23243a, #181920);
    background-size: 400% 400%;
    animation: ultraDarkGradient 32s ease-in-out infinite;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.6em 0;
    font-size: 1.05rem;
    border-bottom: 1.5px solid #23243a;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
@keyframes ultraDarkGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.top-bar p {
    color: #e0e7ff;
    margin: 0;
}
.top-bar a {
    color: #fff;
    text-decoration: underline;
    font-weight: 700;
    transition: color 0.2s;
}
.top-bar a:hover {
    color: #fbbf24;
}


/* --- Main Navigation --- */
header {
    background-color: var(--color-bg-dark);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1020; /* Below Bootstrap's modal z-index */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(30, 41, 59, 0.8);
}
.navbar {
    height: var(--nav-height);
    padding: 0;
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-text-heading);
}
.navbar-brand:hover {
    color: #fff;
}
.navbar .nav-link, .navbar .navbar-brand {
    text-decoration: none;
    transition: color 0.2s, text-decoration 0.2s;
}
.navbar .nav-link:hover, .navbar .navbar-brand:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}
.nav-link {
    color: var(--color-text-muted);
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    position: relative;
    transition: var(--transition-fast);
}
.nav-link:hover,
.nav-link.active {
    color: var(--color-text-heading);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 2px;
}


/* --- Footer --- */
footer {
    background: #000000;
    border-top: 1.5px solid #28283a;
    color: #e5e7eb;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.18);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 2.5rem 0 1.5rem 0;
    margin-top: 2rem;
}
footer p {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 500;
    color: #f3f4f6;
    letter-spacing: 0.2px;
}


/*
=================================================================
5. PAGE-SPECIFIC: HOMEPAGE (INDEX)
=================================================================
*/

/* --- Dynamic Hero Section --- */
.hero-section {
    padding: 6rem 0;
    background: radial-gradient(circle at 10% 20%, rgba(88, 101, 242, 0.15), transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(88, 101, 242, 0.1), transparent 50%);
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
}
.hero-content {
    animation: fadeIn 1s ease-out;
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(90deg, #fff, #bdc3c7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-tagline {
    font-size: 1.25rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.hero-cta-group {
    margin-top: 2rem;
}

/* --- Hero Text Animation --- */
.hero-animation {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    height: 100%;
    min-height: 250px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    animation: slideUp 1s ease-out;
}
.hero-anim-text {
    font-size: 1.5rem;
    text-align: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: cycleText 15s linear infinite;
}
.hero-anim-text:nth-child(1) { animation-delay: 0s; font-family: 'Times New Roman', serif; font-weight: bold; } /* Bold Serif */
.hero-anim-text:nth-child(2) { animation-delay: 3s; font-family: 'Courier New', monospace; } /* Monospace */
.hero-anim-text:nth-child(3) { animation-delay: 6s; font-family: 'cursive'; } /* Script */
.hero-anim-text:nth-child(4) { animation-delay: 9s; } /* Fraktur */
.hero-anim-text:nth-child(5) { animation-delay: 12s; } /* Bubble */


/* --- Main Tool (#tool) --- */
#tool {
    padding-top: 4rem;
    padding-bottom: 4rem;
}
.panel {
    background-color: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    height: 100%;
    transition: var(--transition-fast);
}
.panel:hover {
    border-color: var(--color-bg-panel-light);
}
.panel-title {
    color: var(--color-text-heading);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.75rem;
}
#userInput {
    background-color: var(--color-bg-dark);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    font-size: 1.1rem;
    padding: 1rem;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-inset);
}
#userInput:focus {
    background-color: var(--color-bg-dark);
    color: var(--color-text);
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.3), var(--shadow-inset);
    outline: none;
}
#userInput::placeholder {
    color: var(--color-text-muted);
}


/* --- Results List Styling --- */
#resultsContainer {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 1rem;
    margin-right: -1rem;
}
.result-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 0.5rem;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition-fast);
}
.result-item:last-child {
    border-bottom: none;
}
.result-item:hover {
    background-color: var(--color-bg-panel-light);
    border-radius: var(--border-radius-md);
}
.style-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}
.styled-text {
    font-size: 1.5rem;
    color: var(--color-text-heading);
    word-break: break-all;
    line-height: 1.5;
}
.copy-btn {
    background-color: var(--color-bg-panel-light);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    min-width: 100px;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    text-align: center;
    transition: var(--transition-fast);
}
.copy-btn:hover {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    transform: scale(1.05);
}
.copy-btn.copied {
    background-color: var(--color-success);
    color: #fff;
    border-color: var(--color-success);
    transform: scale(1);
}


/*
=================================================================
6. PAGE-SPECIFIC: STATIC CONTENT PAGES (About, Privacy, Terms)
=================================================================
*/
.content-prose {
    max-width: 800px;
    margin: 0 auto;
}
.content-prose h1.display-5 {
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 1rem;
}
.content-prose h2, .content-prose h3 {
    color: var(--color-text-heading);
    margin-top: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}
.content-prose p, .content-prose li {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
}
.content-prose ul {
    list-style-type: none;
    padding-left: 0;
}
.content-prose ul li {
    padding-left: 2rem;
    position: relative;
}
.content-prose ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}
.content-prose a {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--color-primary);
}
.content-prose a:hover {
    background-color: var(--color-primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
}
.content-prose em {
    color: var(--color-text-muted);
}


/*
=================================================================
7. UTILITY & HELPER CLASSES
=================================================================
*/
.text-gradient {
    background: linear-gradient(90deg, var(--color-primary), var(--color-success));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge-hot { background: #ef4444; color: #fff; }
.badge-like { background: #fbbf24; color: #fff; }
.badge-pinned { background: #6366f1; color: #fff; }
.badge-top {
    background: linear-gradient(90deg, #ffd700 0%, #ffb300 100%);
    color: #222;
    font-weight: 700;
    border: 1.5px solid #fffbe6;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.18);
    font-size: 0.82em;
    letter-spacing: 0.7px;
    text-shadow: 0 1px 2px #fffbe6;
}


/*
=================================================================
8. ANIMATIONS & KEYFRAMES
=================================================================
*/
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes cycleText {
    0%, 20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    25%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}


/*
=================================================================
FAQ SECTION & ACCORDION (Homepage)
=================================================================
*/
#faq {
    background: #f3f4f6;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 1.5rem;
    margin-bottom: 3rem;
    border: 1px solid #e5e7eb;
    margin-top: 0.5rem;
}
#faq h2 {
    color: #6366f1;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}
.accordion {
    --bs-accordion-bg: #fff;
    --bs-accordion-border-color: #e5e7eb;
    --bs-accordion-border-radius: var(--border-radius-md);
    --bs-accordion-btn-bg: #f3f4f6;
    --bs-accordion-btn-color: #23243a;
    --bs-accordion-btn-focus-box-shadow: 0 0 0 2px #6366f1;
    --bs-accordion-active-bg: #e0e7ef;
    --bs-accordion-active-color: #6366f1;
    --bs-accordion-btn-icon-color: #6366f1;
    --bs-accordion-btn-icon-active-color: #6366f1;
    --bs-accordion-body-padding-x: 1.5rem;
    --bs-accordion-body-padding-y: 1.25rem;
}
.accordion-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius-md) !important;
    margin-bottom: 1.2rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.accordion-button {
    background: #f3f4f6;
    color: #23243a;
    font-weight: 600;
    font-size: 1.08rem;
    letter-spacing: 0.2px;
    border: none;
    border-radius: 0 !important;
    box-shadow: none;
    transition: background 0.2s, color 0.2s;
    padding: 1.1rem 1.5rem;
}
.accordion-button:not(.collapsed) {
    background: #e0e7ef;
    color: #6366f1;
}
.accordion-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px #6366f1;
}
.accordion-body {
    background: #fff;
    color: #6366f1;
    font-size: 1.05rem;
    line-height: 1.7;
    border-top: 1px solid #e5e7eb;
    padding: 1.25rem 1.5rem;
}
@media (max-width: 767.98px) {
    #faq {
        padding: 1.2rem 0.5rem;
    }
    .accordion-button, .accordion-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}


/*
=================================================================
9. RESPONSIVE MEDIA QUERIES
=================================================================
*/
@media (max-width: 991.98px) {
    .hero-section {
        padding: 4rem 0;
        text-align: center;
    }
    .hero-animation {
        margin-top: 3rem;
    }
    .result-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .copy-btn {
        width: 100%;
    }
    .lead {
        font-size: 1.08rem;
        margin-bottom: 1.3rem;
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-tagline {
        font-size: 1.1rem;
    }
    .panel {
        padding: 1.5rem;
    }
    .nav-link.active::after {
        display: none; /* Hide line on mobile */
    }
    .nav-link.active {
        background-color: var(--color-bg-panel);
        border-radius: var(--border-radius-md);
    }
    .navbar-collapse {
        background-color: var(--color-bg-dark);
        border-radius: var(--border-radius-md);
        padding: 1rem;
        margin-top: 0.5rem;
    }
    .lead {
        font-size: 1.02rem;
        margin-bottom: 1.2rem;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    h1.display-5 {
        font-size: 2rem;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .styled-text {
        font-size: 1.3rem;
    }
    .lead {
        font-size: 0.97rem;
        margin-bottom: 1.1rem;
        text-align: center;
    }
}

.panel .form-control {
    width: 100%;
    min-height: 220px;
    height: 100%;
    resize: vertical;
    box-sizing: border-box;
}
@media (min-width: 992px) {
    .col-lg-5 .panel {
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    .col-lg-5 .form-control {
        flex: 1 1 auto;
        min-height: 350px;
        height: 100%;
    }
}

/* BlackVault Ads Bar */
.blackvault-ads-bar {
    background: linear-gradient(90deg, #5865f2 0%, #a21caf 100%);
    color: #fff;
    border-radius: 1.2em;
    box-shadow: 0 2px 16px rgba(88,101,242,0.10);
    margin: 1.5rem 0 0.5rem 0;
    padding: 0.55em 2.2em;
    width: 100%;
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    border: none;
}
.blackvault-ads-bar span, .blackvault-ads-bar strong {
    color: #fff;
    font-weight: 700;
}
.blackvault-ads-bar:hover {
    background: linear-gradient(90deg, #7c3aed 0%, #6366f1 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(88,101,242,0.18);
}
@media (max-width: 767.98px) {
    .blackvault-ads-bar {
        font-size: 1.04rem;
        padding: 0.5em 0.7em;
        border-radius: 0.8em;
    }
}