/* FOUNDATION / RESET / THEME / LAYOUT */
/* RESET */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg, picture, video, canvas {
    display: block;
    max-width: 100%;
}

button, input, textarea, select {
    font: inherit;
}

button {
    cursor: pointer;
}

ul, ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

blockquote {
    quotes: none;
}

/* THEME */
:root {
    /* Colors */
    --bg: #131218;
    --surface: #18181a;
    --surface-2: #222228;

    --text: #f5f8fa;
    --text-muted: #a9adb5;

    --accent: rgb(201, 174, 22);
    --accent-hover: rgb(222, 194, 34);

    --border: rgba(255,255,255,0.08);

    --success: #1fc77a;
    --danger: #ff5d5d;
    --warning: #f8b400;

    /* Gradients */
    --gradient-main: linear-gradient(135deg, #18181a 0%, #252533 50%, rgb(201, 174, 22) 100%);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));

    /* Radius */
    --radius-xs: .8rem;
    --radius-sm: 1.2rem;
    --radius-md: 1.8rem;
    --radius-lg: 2.4rem;
    --radius-xl: 3rem;

    /* Shadows */
    --shadow-sm: 0 4px 12px rgba(0,0,0,.20);
    --shadow-md: 0 10px 30px rgba(0,0,0,.25);
    --shadow-lg: 0 20px 60px rgba(0,0,0,.35);

    /* Layout */
    --sidebar-width: 28rem;
    --header-height: 7rem;
    --container: 130rem;

    /* Animation */
    --transition: 180ms ease;
    --transition-slow: 280ms ease;
}

/* LIGHT MODE */
/* @media (prefers-color-scheme: light) {
    :root {
        --bg: #f7f8fb;

        --surface: #ffffff;
        --surface-2: #f0f2f5;

        --text: #15161a;
        --text-muted: #5d6470;

        --border: rgba(0,0,0,.08);

        --gradient-main: linear-gradient(135deg, #ffffff 0%, #f2f3f7 50%, rgba(201,174,22,.20) 100%);

        --gradient-card: linear-gradient(145deg, rgba(255,255,255,.9), rgba(255,255,255,.6));
    }
}*/

/* ==========================================================
   BODY
   ========================================================== */
body {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.6rem;
    line-height: 1.6;
}

/* ==========================================================
   ACCESSIBILITY
   ========================================================== */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

::selection {
    background: var(--accent);
    color: #000;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ==========================================================
   TYPOGRAPHY
   ========================================================== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.15;
}

h1 {
    font-size: clamp(2.8rem, 4vw, 3.6rem);
}

h2 {
    font-size: clamp(2.4rem, 3vw, 3.2rem);
}

h3 {
    font-size: clamp(2rem, 2vw, 2.4rem);
}

.payment-notice{
    margin: 1rem 0;
    padding: .9rem 1rem;
    border-radius: 12px;
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-left: 5px solid #10b981;
    color: #065f46;
    font-size: .9rem;
    line-height: 1.5;
}

p {
    color: inherit;
}

small {
    color: var(--text-muted);
}

.label {
    font-size: 1.3rem;
    color: var(--text-muted);
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ==========================================================
   APP LAYOUT
   ========================================================== */
.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

/* ==========================================================
   MOBILE HEADER
   ========================================================== */
.mobile-header {
    display: none;
    justify-content: space-between;
    padding: 0 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    font-size: 2rem;
}

.brand-text {
    font-size: 2rem;
    font-weight: 700;
}

/* ==========================================================
   MENU BUTTON
   ========================================================== */
.menu-toggle {
    width: 4.6rem;
    height: 4.6rem;
    border: none;
    border-radius: 1rem;
    background: var(--surface);
    color: var(--text);
    font-size: 2rem;
    transition: var(--transition);
}

.menu-toggle:hover {
    transform: translateY(-2px);
}

/* ==========================================================
   SIDEBAR
   ========================================================== */
.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
    padding: 2.4rem;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.sidebar-logo {
    font-size: 2.4rem;
}

.sidebar h1 {
    color: var(--accent);
}

/* ==========================================================
   CATEGORY LIST
   ========================================================== */
.category-list {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.category-list li {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    user-select: none;
}

.category-list li:hover {
    background: rgba(255,255,255,.04);
    transform: translateX(4px);
}

.category-list li.active {
    background: var(--accent);
    color: #000;
    font-weight: 700;
}

.tab-button.active {
    background: rgb(201, 174, 22);
    color: #fff;
}

.category-list li.active:hover {
    transform: none;
}

/* ==========================================================
   SIDEBAR FOOTER
   ========================================================== */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-top: 1px solid var(--border);
}

.sidebar-footer p {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: .3rem;
}

.sidebar-footer small {
    display: flex;
    font-size: 1.2rem;
}

/* ==========================================================
   MAIN CONTENT
   ========================================================== */
.main-content {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding: 3rem clamp(2rem, 4vw, 5rem) 5rem;
}

/* ==========================================================
   VIEW SYSTEM
   ========================================================== */
.view-section {
    display: none;
}

.view-section.is-active {
    display: block;
}

/* ==========================================================
   GENERIC CARDS
   ========================================================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================
   BUTTON SYSTEM
   ========================================================== */
.primary-button {
    border: none;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    padding: 1.2rem 2rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.primary-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.primary-button:active {
    transform: scale(.98);
}

/* ==========================================================
   SECONDARY BUTTON
   ========================================================== */
.secondary-button {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 1.2rem 2rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.secondary-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ==========================================================
   SCROLLBAR
   ========================================================== */
::-webkit-scrollbar {
    width: .9rem;
    height: .9rem;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: rgba(201,174,22,.6);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201,174,22,.9);
}

/* ==========================================================
   VIBELINES.CSS
   PART 2 — HOME PAGE / DAILY SIGNAL / STREAK /
   MOODS / SURPRISE / ECHO / DAILY MIX
   ========================================================== */

/* ==========================================================
   HOME SECTION
   ========================================================== */

#homeSection {
    width: 100%;
}

.home-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.home-subtitle {
    margin-top: .8rem;
    color: var(--text-muted);
    font-size: 1.5rem;
}

/* ==========================================================
   STATE BAR
   ========================================================== */
.state-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.streak-card, .countdown-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.streak-card strong, .countdown-card strong {
    display: block;
    margin-top: .8rem;
    font-size: clamp(2.4rem, 3vw, 3rem);
    font-weight: 800;
}

/* ==========================================================
   DAILY SIGNAL
   ========================================================== */
.daily-signal {
    position: relative;
    padding: 3rem;
    margin-bottom: 3rem;
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(201,174,22,.15), rgba(201,174,22,.04)), var(--surface);
    box-shadow: var(--shadow-md);
}

.daily-signal::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(201,174,22,.15), transparent 40%);
    pointer-events: none;
}

.signal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.today-badge {
    display: inline-flex;
    align-items: center;
    padding: .6rem 1.2rem;
    border-radius: 999px;
    background: var(--accent);
    color: #000;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: .05em;
}

#expiresIn {
    color: var(--text-muted);
    font-size: 1.4rem;
}

.daily-quote {
    position: relative;
    font-size: clamp(2.4rem, 3vw, 3.8rem);
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    margin: 2rem auto;
    max-width: 85rem;
}

.daily-quote::before {
    content: "❝";
    position: absolute;
    left: -2rem;
    top: -2rem;
    font-size: 6rem;
    opacity: .15;
    color: var(--accent);
}

.signal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

.signal-actions button {
    border: none;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    padding: 1.2rem 2rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.signal-actions button:hover {
    transform: translateY(-2px);
    background: var(--accent-hover);
}

.signal-actions button:active {
    transform: scale(.98);
}

/* ==========================================================
   SURPRISE SECTION
   ========================================================== */
.surprise-section {
    margin-bottom: 3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-sm);
}

.surprise-button {
    width: 100%;
    border: none;
    border-radius: var(--radius-xl);
    padding: 2.2rem;
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #ff8a00, #ff5e62, #ff2d55);
    box-shadow: 0 15px 40px rgba(255,94,98,.25);
    transition: var(--transition);
}

.surprise-button:hover {
    transform: translateY(-3px);
}

.surprise-button:active {
    transform: scale(.98);
}

.surprise-button:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================
   DIVIDER
   ========================================================== */
.divider {
    position: relative;
    text-align: center;
    margin: 3rem 0;
    color: var(--text-muted);
    font-weight: 600;
}

.divider::before, .divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: var(--border);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* ==========================================================
   MOOD SECTION
   ========================================================== */
.mood-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.mood-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
}

.mood-button {
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    padding: 1.4rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    transition: var(--transition);
}

.mood-button:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.mood-button.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* ==========================================================
   NUDGE CARD
   ========================================================== */
#nudge {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background: rgba(201,174,22,.08);
    border: 1px solid rgba(201,174,22,.25);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

#nudge:hover {
    background: rgba(201,174,22,.12);
}

/* ==========================================================
   SURPRISE RESULT
   ========================================================== */
.surprise-result {
    margin-bottom: 3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-sm);
}

.surprise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.surprise-header button {
    width: 4rem;
    height: 4rem;
    border: none;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
}

#surpriseQuote {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.6;
    text-align: center;
}

#cooldownMessage {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 1.4rem;
}

#cooldownTimer {
    font-weight: 700;
    color: var(--accent);
}

/* ==========================================================
   ECHO SECTION
   ========================================================== */
.echo-section {
    margin-bottom: 3rem;
    padding: 3rem;
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid var(--border);
}

.echo-section h3 {
    margin-bottom: 2rem;
}

#echoQuote {
    font-size: 2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

#echoDate {
    color: var(--text-muted);
}

/* ==========================================================
   STREAK MILESTONE
   ========================================================== */
.milestone {
    margin-bottom: 3rem;
    padding: 3rem;
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid var(--border);
}

.milestone label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 700;
}

.milestone progress {
    width: 100%;
    height: 1.6rem;
    border: none;
    border-radius: 999px;
    overflow: hidden;
}

.milestone progress::-webkit-progress-bar {
    background: var(--surface-2);
}

.milestone progress::-webkit-progress-value {
    background: var(--accent);
}

.milestone p {
    margin-top: 1.2rem;
    color: var(--text-muted);
}

#daysLeft {
    color: var(--accent);
    font-weight: 700;
}

/* ==========================================================
   DAILY MIX
   ========================================================== */
.daily-mix {
    padding: 3rem;
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 3rem;
}

.daily-mix h3 {
    margin-bottom: 2rem;
}

.quote-list {
    display: grid;
    gap: 1.5rem;
}

.mix-item {
    padding: 1.8rem;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.mix-item p {
    line-height: 1.7;
}

#mixCap {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
}

/* ==========================================================
   NOTIFICATION SECTION
   ========================================================== */
.notify-section {
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    text-align: center;
}

.notify-section p {
    margin-bottom: 1rem;
}

.notify-section button {
    border: none;
    background: var(--accent);
    color: #000;
    padding: 1.2rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
}

/* ==========================================================
   HOME PAGE ENTRANCE ANIMATION
   ========================================================== */
@keyframes fadeUp {
    from {opacity: 0; transform: translateY(20px);}
    to {opacity: 1; transform: translateY(0);}
}

.daily-signal, .surprise-section, .echo-section, .milestone, .daily-mix {
    animation: fadeUp .45s ease;
}

/* ==========================================================
   VIBELINES.CSS
   PART 3 — CATEGORY VIEW / SEARCH / QUOTE CARDS /
   ACTION BUTTONS / LOADER / TOASTS
   ========================================================== */

/* ==========================================================
   CATEGORY SECTION
   ========================================================== */

#categorySection {
    width: 100%;
}

#savedQuotesSection h2{
    margin-bottom: 2rem;
}

.tab-intro {
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 1.6rem;
    line-height: 1.7;
}

/* ==========================================================
   TAB SCROLLER
   ========================================================== */

.tab-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    scrollbar-width: thin;
}

.tab-scroll::-webkit-scrollbar {
    height: 6px;
}

.tab-button {
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 1rem 1.8rem;
    border-radius: 999px;
    font-size: 1.4rem;
    font-weight: 600;
    transition: var(--transition);
}

.tab-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.tab-button.active, .tab-button[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

/* ==========================================================
   SEARCH
   ========================================================== */

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.search-box input {
    flex: 1;
    min-height: 5rem;
    padding: 1.4rem 1.6rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    transition: var(--transition);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(201,174,22,.12);
}

.search-box button {
    min-width: 12rem;
    border: none;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    padding: 1.2rem 2rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* ==========================================================
   QUOTES GRID
   ========================================================== */
.quotes-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(2, 1fr);
}

/* ==========================================================
   QUOTE CARD
   ========================================================== */
.quote-card {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.4rem;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.quote-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201,174,22,.30);
    box-shadow: 0 12px 30px rgba(0,0,0,.20);
}

.quote-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

/* ==========================================================
   QUOTE TEXT
   ========================================================== */
.quote-text {
    font-size: clamp(1.8rem, 2vw, 2.2rem);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.quote-text::before {
    content: "❝ ";
    color: var(--accent);
    opacity: .6;
}

.quote-image{
    width:100%;
    margin-bottom:1.5rem;
    overflow:hidden;
    border-radius: var(--radius-sm);
}

.quote-image img{
    width:100%;
    display:block;
    object-fit:cover;
    aspect-ratio:16/9;
    border-radius: var(--radius-sm);
    opacity:0;
    transition:opacity 0.35s ease;
}

.quote-image img.loaded{
    opacity:1;
}

/* ==========================================================
   QUOTE ACTION BAR
   ========================================================== */
.quote-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.quote-actions button{
    background-color: transparent;
    border: none;
    color: #f0f2f5;
}

/* ==========================================================
   GENERIC ACTION BUTTON
   ========================================================== */
.action-btn {
    border: none;
    min-height: 4.4rem;
    padding: 0 1.6rem;
    border-radius: var(--radius-md);
    font-size: 1.4rem;
    font-weight: 600;
    transition: var(--transition);
}

/* ==========================================================
   COPY BUTTON
   ========================================================== */
.copy-btn {
    background: rgba(201,174,22,.12);
    color: var(--accent);
    border: 1px solid rgba(201,174,22,.25);
}

.copy-btn:hover {
    background: var(--accent);
    color: #000;
}

/* ==========================================================
   SHARE BUTTON
   ========================================================== */
.share-btn {
    background: rgba(70,130,255,.12);
    color: rgb(98,155,255);
    border: 1px solid rgba(70,130,255,.25);
}

.share-btn:hover {
    background: rgb(98,155,255);
    color: white;
}

/* ==========================================================
   DOWNLOAD IMAGE BUTTON
   ========================================================== */
.download-btn {
    background: rgba(0,220,130,.12);
    color: rgb(0,220,130);
    border: 1px solid rgba(0,220,130,.25);
}

.download-btn:hover {
    background: rgb(0,220,130);
    color: black;
}

/* ==========================================================
   SAVE BUTTON
   ========================================================== */
.save-btn {
    background: rgba(255,100,140,.12);
    color: rgb(255,120,160);
    border: 1px solid rgba(255,120,160,.25);
}

.save-btn:hover {
    background: rgb(255,120,160);
    color: black;
}

/* ==========================================================
   ACTIVE STATE
   ========================================================== */
.action-btn:active {
    transform: scale(.96);
}

/* ==========================================================
   DISABLED
   ========================================================== */
.action-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================
   LOADER
   ========================================================== */
.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 12rem;
    color: var(--text-muted);
    font-size: 1.6rem;
}

.loader::before {
    content: "";
    width: 2rem;
    height: 2rem;
    margin-right: 1rem;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.15);
    border-top-color: var(--accent);
    animation: spin .8s linear infinite;
}

@keyframes spin {
    from {transform: rotate(0);}
    to {transform: rotate(360deg);}
}

/* ==========================================================
   NO RESULTS
   ========================================================== */
#noResults {
    text-align: center;
    padding: 4rem 2rem;
    border-radius: var(--radius-xl);
    border: 1px dashed var(--border);
    color: var(--text-muted);
}

/* ==========================================================
   EMPTY STATE
   ========================================================== */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-state h3 {
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-muted);
}

/* ==========================================================
   TOAST
   ========================================================== */
.toast {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    min-width: 28rem;
    max-width: 40rem;
    z-index: 9999;
    background: var(--surface);
    border: 1px solid rgba(201,174,22,.25);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.8rem;
    box-shadow: 0 15px 40px rgba(0,0,0,.35);
    animation: toastIn .25s ease;
}

.toast.success {
    border-color: rgba(0,220,130,.30);
}

.toast.error {
    border-color: rgba(255,90,90,.30);
}

.toast.warning {
    border-color: rgba(255,190,0,.30);
}

@keyframes toastIn {
    from {opacity: 0; transform: translateY(20px);}
    to {opacity: 1; transform: translateY(0);}
}

/* ==========================================================
   LOAD MORE SENTINEL
   ========================================================== */
.load-sentinel {
    width: 100%;
    height: 1px;
}

/* ==========================================================
   QUOTE CARD ENTRY ANIMATION
   ========================================================== */
@keyframes cardEnter {
    from {opacity: 0; transform: translateY(12px);}
    to {opacity: 1; transform: translateY(0);}
}

.quote-card {
    animation: cardEnter .3s ease;
}

/* ==========================================================
   SEARCHING STATE
   ========================================================== */
.is-searching .quote-card {
    opacity: .6;
    pointer-events: none;
}

/* ==========================================================
   HIGHLIGHT MATCH
   ========================================================== */
mark {
    background: rgba(201,174,22,.25);
    color: inherit;
    padding: .1rem .2rem;
    border-radius: .3rem;
}

/* =========================================================
   VIBELINES.CSS — PART 4
   QUOTE IMAGE GENERATOR + UTILITIES + POLISH
========================================================= */

/* =========================================================
   QUOTE IMAGE MODAL
========================================================= */

.quote-image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.82);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

.quote-image-modal[hidden] {
    display: none;
}

.quote-image-container {
    max-width: 95%;
    max-height: 95%;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    align-items: center;
}

.quote-image-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quote-image-actions button {
    border: none;
    cursor: pointer;
    border-radius: 1rem;
    padding: 1rem 1.8rem;
    font-weight: 700;
    transition: .2s ease;
}

.quote-image-actions button:hover {
    transform: translateY(-2px);
}

.download-image-btn {
    background: var(--accent);
    color: #000;
}

.share-image-btn {
    background: #fff;
    color: #000;
}

.close-image-btn {
    background: #ef4444;
    color: #fff;
}

/* =========================================================
   GENERATED IMAGE CARD
========================================================= */
.quote-image-card {
    width: min(900px, 90vw);
    min-height: 900px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 3rem;
    padding: 5rem;
    color: white;
    background: radial-gradient(circle at top left, rgba(255,107,107,.35), transparent 40%), 
                radial-gradient(circle at bottom right, rgba(255,138,0,.3), transparent 45%),
                linear-gradient(135deg, #18181a, #131218, #1b1b20);
}

/* floating glow */
.quote-image-card::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255,107,107,.08);
    border-radius: 50%;
    top: -120px;
    right: -120px;
    filter: blur(30px);
}

.quote-image-card::after {
    content: "";
    position: absolute;
    width: 350px;
    height: 350px;
    background: rgba(255,138,0,.06);
    border-radius: 50%;
    bottom: -120px;
    left: -120px;
    filter: blur(25px);
}

/* =========================================================
   WATERMARK ICON
========================================================= */
.quote-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    margin-bottom: 3rem;
    backdrop-filter: blur(6px);
}

.quote-logo svg {
    width: 48px;
    height: 48px;
}

/* =========================================================
   BIG QUOTE
========================================================= */
.quote-image-text {
    font-size: clamp(2.8rem, 4vw, 5.4rem);
    line-height: 1.45;
    font-weight: 800;
    max-width: 80%;
    position: relative;
    z-index: 2;
}

.quote-image-text::before {
    content: "“";
    font-size: 8rem;
    opacity: .18;
    display: block;
    margin-bottom: 1rem;
}

.quote-image-text::after {
    content: "”";
    font-size: 8rem;
    opacity: .18;
    display: block;
    margin-top: 1rem;
}

/* =========================================================
   WATERMARK FOOTER
========================================================= */
.quote-image-footer {
    position: absolute;
    bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.7rem;
    font-weight: 700;
    color: rgba(255,255,255,.85);
}

.quote-image-footer svg {
    width: 24px;
    height: 24px;
}

.quote-image-footer span {
    letter-spacing: .08em;
}

/* =========================================================
   IMAGE DOWNLOAD LOADER
========================================================= */
.image-loading {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.image-loading[hidden] {
    display: none;
}

.image-loading .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* =========================================================
   ACCESSIBILITY
========================================================= */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

::selection {
    background: var(--accent);
    color: #000;
}

button, input, textarea, select {
    font: inherit;
}

/* =========================================================
   UTILITIES
========================================================= */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.w-full {
    width: 100%;
}

/* =========================================================
   SMOOTH SCROLL
========================================================= */
html {
    scroll-behavior: smooth;
}

.order-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.75);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:9999;
    padding:20px;
}

.hidden{
    display:none;
}

.order-card{
    background:#18181a;
    width:min(550px,100%);
    padding:30px;
    border-radius:18px;
    display:flex;
    flex-direction:column;
    gap:15px;
    position:relative;
}

.order-card h2{
    margin:0;
}

.order-card input, .order-card textarea, .order-card select{
    width:100%;
    padding:14px;
    border-radius:10px;
    background:#232327;
    color:white;
    border:1px solid #333;
    font:inherit;
}

.order-card textarea{
    resize:vertical;
    min-height:140px;
}

.close-order{
    position:absolute;
    top:15px;
    right:15px;
    background:none;
    border:none;
    color:white;
    font-size:20px;
    cursor:pointer;
}

.payment-success{
    max-width: 110rem;
    margin: 7rem auto;
    padding: 4rem 2rem;
    text-align: center;
    font-size: 3rem;
}

.success-icon{
    width: 9rem;
    height: 9rem;
    margin: auto;
    border-radius: 50%;
    background: #22c55e;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    color: white;
    margin-bottom: 2rem;
}

.success-card{
    margin-top: 3rem;
    padding: 3rem;
    border-radius: 2rem;
    background: var(--card-bg);
}

.delivery-box{
    margin: 3rem auto;
    text-align: left;
    padding: 2rem;
    border-left: 5px solid var(--accent);
    background: var(--gradient-main);
}

.delivery-box li{
    margin: 1.5rem 0;
}

.trust-box{
    padding: 20px;
    margin: 30px 0;
    border-radius: 1.4rem;
    background: var(--gradient-main);
}

.payment-success button{
    margin-top: 2.5rem;
    padding: 1.5rem 3.5rem;
    font-size: 20px;
    border: none;
    border-radius: 1.5rem;
    cursor: pointer;
    background: var(--accent);
    color: var(--surface);
    font-weight: 700;
    transition: 0.3s;
}

.payment-success button:hover{
    transform: translateY(-2px);
}

@media (max-width: 2600px) {

    .main-content {
        max-width: 2000px;
    }

    .dailyQuote {
        font-size: 3rem;
    }
}

@media (max-width: 1600px) {
    .quotes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1000px) {
    :root{
        font-size: 50%;
    }
    
    .sidebar{
        display: flex;
    }

    .quotes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 880px) {
    :root{
        font-size: 50%;
    }

    .sidebar{
        display: none;
    }

    .mobile-header {
        display: flex;
    }

    .app-layout {
        grid-template-columns: none;
    }

    .quotes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mobile-menu {
        position: absolute;
        top: 7rem;
        right: 1rem;
        width: 25rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        overflow: hidden;
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all .25s ease;
        z-index: 999;
    }

    .mobile-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu .category-list {
        padding: 1rem;
    }

    .mobile-menu .category-list li {
        padding: 1.4rem;
    }
}

@media (max-width: 500px) {
    :root{
        font-size: 45%;
    }

    .sidebar{
        display: none;
    }

    .main-content{
        width: 100vw;
        margin: auto;
    }
    
    .quotes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mobile-menu {
        position: absolute;
        top: 7rem;
        right: 1rem;
        width: 25rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        overflow: hidden;
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all .25s ease;
        z-index: 999;
    }

    .mobile-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu .category-list {
        padding: 1rem;
    }

    .mobile-menu .category-list li {
        padding: 1.4rem;
    }

    .mobile-header {
        position: relative;
    }
}
