/* --- Base Setup & Variables --- */
:root {
    /* Colors from theme.json */
    --primary-neon: #EC407A;
    --secondary-cyan: #4DD0E1;
    --violet: #8E24AA;
    --ink: #0E0A1A;
    --panel-bg: rgba(10, 6, 22, 0.75);
    --text: #EDE7F6;
    --muted-text: #B39DDB;
    --top-bg: #3D2A5A;
    --bottom-bg: #000000;

    /* Effects from theme.json */
    --glow-pink: 0 0 30px rgba(236, 64, 122, 0.25), 0 0 10px rgba(77, 208, 225, 0.15);
    --panel-radius: 16px;
    --button-radius: 28px;
    --backdrop-blur: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-image: linear-gradient(to bottom, var(--top-bg), var(--bottom-bg));
    color: var(--text);
    min-height: 100vh;
    padding: 1.5rem;
}

/* --- Background Assets --- */
#background-assets {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: 100% auto;
}

/* --- Header & Typography --- */
header {
    text-align: center;
    margin-bottom: 2rem;
}

.main-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    color: var(--primary-neon);
    text-shadow: 0 0 5px var(--primary-neon), 0 0 10px var(--primary-neon), 0 0 20px var(--violet);
}

.subtitle {
    font-size: clamp(0.8rem, 3vw, 1rem);
    color: var(--muted-text);
    max-width: 450px;
    margin: 0.5rem auto 0;
}

/* --- Main Layout & Views --- */
main {
    max-width: 650px;
    margin: 0 auto;
}

.view { display: none; }
.view.active { display: block; }

/* --- Panel/Card Styling --- */
.panel {
    background: var(--panel-bg);
    border: 1px solid rgba(236, 64, 122, 0.2);
    border-radius: var(--panel-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
    box-shadow: var(--glow-pink);
}

.panel-title {
    font-size: 1.25rem;
    color: var(--secondary-cyan);
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(77, 208, 225, 0.2);
    padding-bottom: 0.75rem;
}

/* --- Form Elements --- */
.form-field {
    margin-bottom: 1.25rem;
    transition: opacity 0.3s ease, max-height 0.3s ease, transform 0.3s ease;
    transform-origin: top;
}

.form-field.hidden {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    overflow: hidden;
    padding: 0;
    transform: scaleY(0);
}

.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--muted-text);
    font-weight: 500;
}

.form-field input[type="text"],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--violet);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-field input[type="text"]:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary-neon);
    box-shadow: 0 0 10px var(--primary-neon);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.radio-group label {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
    cursor: pointer;
    color: var(--text);
}

.radio-group input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: var(--primary-neon);
}


/* --- Buttons --- */
.actions-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center; /* Center the main generate button */
}

.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: var(--button-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.btn-primary_pink {
    background-color: var(--primary-neon);
    color: var(--ink);
    border-color: var(--primary-neon);
}
.btn-primary_pink:hover {
    box-shadow: 0 0 15px var(--primary-neon);
}

.btn-outline_cyan {
    background-color: transparent;
    color: var(--secondary-cyan);
    border-color: var(--secondary-cyan);
}
.btn-outline_cyan:hover {
    background-color: var(--secondary-cyan);
    color: var(--ink);
}

.btn-outline_pink {
    background-color: transparent;
    color: var(--primary-neon);
    border-color: var(--primary-neon);
}
.btn-outline_pink:hover {
    background-color: var(--primary-neon);
    color: var(--ink);
}


/* --- Loading Overlay --- */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 10, 26, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    text-align: center;
}
#loading-overlay.hidden {
    display: none;
}
.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--violet);
    border-top-color: var(--primary-neon);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Results View --- */
.results-box {
    margin-bottom: 1.5rem;
}
.results-title {
    font-size: 1.25rem;
    color: var(--secondary-cyan);
    margin-bottom: 0.75rem;
}
.results-content {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--violet);
    border-radius: 8px;
    padding: 1rem;
    min-height: 150px;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.results-content p {
    line-height: 1.6;
}

/* New Hook Title Style */
#box_hook_title .results-content {
    text-align: center;
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    font-weight: bold;
    color: var(--primary-neon);
    text-shadow: 0 0 8px var(--primary-neon);
    background: none;
    border: none;
    padding: 0.5rem;
}

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
}
.pagination-controls span {
    color: var(--muted-text);
}

/* New Button Container Style */
#copy_button_container {
    display: flex;
    justify-content: center;
    margin: -0.5rem 0 1.5rem 0;
}

