:root {
    --bg: #0b0b0c;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-highlight: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #f0f0f0;
    --text-muted: #777;

    /* NEW ORANGE THEME */
    --accent-orange: #f97316;
    --accent-text: #000000;
    --glow: rgba(249, 115, 22, 0.15);

    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Work Sans', sans-serif;
    --font-mono: 'Inconsolata', monospace;

    /* TEXTURED BACKGROUND CONTROLS */
    --cell: 6px;
    /* distance between points */
    --dot: 1.2px;
    /* point size */
    --dot-color: rgba(255, 255, 255, .08);
    --grid-opacity: .85;
    --noise-opacity: .22;
    --shade-opacity: .55;
    --vignette-opacity: .85;
}

.hidden {
    display: none !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    overflow: hidden;
}

body {
    height: 100%;
    overflow: hidden;
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-sans);
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: pageLoad 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
}

@keyframes pageLoad {
    from {
        opacity: 0;
        filter: blur(8px);
    }

    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* ===== NEW TEXTURED BACKGROUND ===== */
/* 1) Soft wavy/cloth shading (animated) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -4;
    background:
        radial-gradient(900px 650px at 55% 40%, rgba(255, 255, 255, .08), transparent 60%),
        radial-gradient(1100px 800px at 20% 70%, rgba(255, 255, 255, .06), transparent 62%),
        radial-gradient(1000px 700px at 85% 25%, rgba(255, 255, 255, .05), transparent 60%),
        radial-gradient(1200px 900px at 50% 115%, rgba(0, 0, 0, .65), transparent 60%),
        var(--bg);
    filter: blur(0.2px);
    opacity: var(--shade-opacity);
    background-size: 140% 140%;
    animation: shade-drift 18s ease-in-out infinite alternate;
}

@keyframes shade-drift {
    0% {
        background-position: 40% 30%, 0% 100%, 100% 0%, 50% 100%, 0 0;
    }

    100% {
        background-position: 55% 45%, 15% 85%, 85% 10%, 50% 100%, 0 0;
    }
}

/* 2) Micro dot/square grid overlay */
.bg-grid-dots {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -3;
    background-image: radial-gradient(circle, var(--dot-color) var(--dot), transparent calc(var(--dot) + 0.7px));
    background-size: var(--cell) var(--cell);
    opacity: var(--grid-opacity);
    mix-blend-mode: overlay;
}

/* 3) Grain/noise overlay */
.bg-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
    background-size: 240px 240px;
    opacity: var(--noise-opacity);
    mix-blend-mode: soft-light;
    filter: contrast(120%) brightness(90%);
}

/* 4) Vignette */
.bg-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(1200px 800px at 50% 45%, transparent 40%, rgba(0, 0, 0, .65) 75%, rgba(0, 0, 0, .95) 100%);
    opacity: var(--vignette-opacity);
}

/* Custom Scrollbar for Library */
.library-list::-webkit-scrollbar {
    width: 6px;
}

.library-list::-webkit-scrollbar-track {
    background: transparent;
}

.library-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.library-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.material-icons,
.material-symbols-outlined {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
}

.material-icons.md-18 {
    font-size: 18px;
}

.material-icons.md-20 {
    font-size: 20px;
}

.material-icons.md-24 {
    font-size: 24px;
}

.material-icons.md-36 {
    font-size: 36px;
}

/* ===== HEADER ===== */
.header {
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    animation: headerSlide 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.1s;
    opacity: 0;
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 10;
}

@keyframes headerSlide {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.logo:hover {
    transform: scale(1.04);
}

.logo-img {
    height: 32px;
    width: auto;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.logo:hover .logo-img {
    transform: rotate(15deg) scale(1.1);
    filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.4));
}

/* ===== HEADER ACTIONS ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-account {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    padding: 0;
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    border-radius: 50%;
}

.account-btn:hover {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.15);
}

.account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 8px;
    min-width: 170px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    z-index: 1000;
    animation: menuPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top right;
}

@keyframes menuPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.account-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.account-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    padding-left: 18px;
}

/* ===== MAIN CONTAINER ===== */
.main-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 900px) {
    .main-container {
        padding: 0 24px;
    }

    .hero-section {
        margin-bottom: 3.5rem;
    }
}

@media (max-width: 600px) {
    .main-container {
        padding: 0 16px;
    }

    .hero-section {
        margin-bottom: 2.5rem;
    }
}

/* ===== HERO ===== */
.hero-section {
    text-align: center;
    width: 100%;
    margin-bottom: 3rem;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

@keyframes heroReveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
        filter: blur(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.hero-section.hidden {
    display: none;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    margin-bottom: 14px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 600;
    position: relative;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--accent-orange), #ea580c);
    color: var(--accent-text);
    padding: 2px 14px;
    font-style: italic;
    display: inline-block;
    transform: skewX(-3deg);
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: highlightGlow 4s ease-in-out infinite;
    position: relative;
}

@keyframes highlightGlow {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(249, 115, 22, 0), 0 4px 15px rgba(249, 115, 22, 0.1);
    }

    50% {
        box-shadow: 0 0 40px rgba(249, 115, 22, 0.2), 0 4px 20px rgba(249, 115, 22, 0.15);
    }
}

.hero-title .highlight:hover {
    transform: skewX(-3deg) scale(1.08) translateY(-2px);
    box-shadow: 0 8px 30px rgba(249, 115, 22, 0.3);
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 0.02em;
    animation: subtitleFade 1s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
    padding-bottom: 50px;
}

@keyframes subtitleFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== INPUT BOX ===== */
.input-wrapper {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 20px 24px;
    position: relative;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    animation: inputReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.4s;
    opacity: 0;
    backdrop-filter: blur(12px);
}

@keyframes inputReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.input-wrapper::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0), rgba(249, 115, 22, 0));
    z-index: -1;
    transition: all 0.5s ease;
    opacity: 0;
}

.input-wrapper:focus-within {
    border-color: rgba(249, 115, 22, 0.3);
    box-shadow:
        0 0 0 4px rgba(249, 115, 22, 0.06),
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.04);
}

.input-wrapper:focus-within::before {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.05));
    opacity: 1;
}

.input-wrapper:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.input-area {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1.05rem;
    resize: none;
    outline: none;
    min-height: 64px;
    max-height: 200px;
    line-height: 1.6;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.input-area::-webkit-scrollbar {
    display: none;
}

.input-area::placeholder {
    color: rgba(255, 255, 255, 0.2);
    font-family: var(--font-sans);
    transition: all 0.4s ease;
}

.input-area:focus::placeholder {
    color: rgba(255, 255, 255, 0.3);
    transform: translateX(4px);
}

/* ===== INPUT TOOLS ===== */
.input-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    gap: 12px;
}

/* Audio Chip */
.audio-chip {
    cursor: pointer;
    user-select: none;
}

.audio-chip input {
    display: none;
}

.audio-chip .chip-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.audio-chip .chip-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(249, 115, 22, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.audio-chip:hover .chip-content {
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.audio-chip input:checked+.chip-content {
    background: linear-gradient(135deg, var(--accent-orange), #ea580c);
    border-color: transparent;
    color: var(--accent-text);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.25);
    transform: translateY(-1px);
}

.audio-chip input:checked+.chip-content::before {
    opacity: 0;
}

.audio-chip .material-icons {
    font-size: 18px;
}

/* Tool Buttons */
.tool-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.tool-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.tool-btn:hover::after {
    opacity: 1;
}

.tool-btn:active {
    transform: scale(0.92);
}

.tool-btn.active-img {
    color: var(--accent-orange);
    background: rgba(249, 115, 22, 0.08);
    border-color: rgba(249, 115, 22, 0.3);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.1);
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(135deg, #f0f0f0, #ffffff);
    color: var(--bg);
    border: none;
    border-radius: 14px;
    padding: 0 22px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-sans);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: 'Generate';
    font-size: 0.92rem;
}

.submit-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.4) 50%, transparent 60%);
    transition: transform 0.6s ease;
    transform: translateX(-100%);
}

.submit-btn:hover::after {
    transform: translateX(100%);
}

.submit-btn .material-icons {
    font-size: 20px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.submit-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

.submit-btn:hover .material-icons {
    transform: translateX(5px) rotate(-15deg);
}

.submit-btn:active {
    transform: scale(0.95);
}

.submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ===== EXAMPLE PILLS ===== */
.examples-container {
    display: flex;
    gap: 10px;
    margin-top: 36px;
    flex-wrap: wrap;
    justify-content: center;
}

.example-pill {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    animation: pillReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
}

.example-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.example-pill:nth-child(1) {
    animation-delay: 0.55s;
}

.example-pill:nth-child(2) {
    animation-delay: 0.65s;
}

.example-pill:nth-child(3) {
    animation-delay: 0.75s;
}

.example-pill:nth-child(4) {
    animation-delay: 0.85s;
}

@keyframes pillReveal {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.example-pill:hover {
    border-color: rgba(249, 115, 22, 0.3);
    color: var(--text-main);
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.12);
    background: rgba(249, 115, 22, 0.04);
}

.example-pill:hover::before {
    opacity: 1;
}

.example-pill:active {
    transform: scale(0.96);
}

/* ===== IMAGE PREVIEW ===== */
.image-preview-bar {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    width: fit-content;
    animation: previewSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes previewSlide {
    from {
        opacity: 0;
        transform: translateX(-15px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.image-preview-bar.visible {
    display: flex;
}

.preview-thumb {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.preview-thumb:hover {
    transform: scale(1.1);
}

.remove-img {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-sans);
    font-size: 12px;
    color: #ff5555;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.remove-img:hover {
    color: #ff7777;
    background: rgba(255, 85, 85, 0.1);
}

/* ===== PROCESSING VIEW ===== */
.processing-view {
    display: none;
    width: 100%;
    max-width: 1200px;
    text-align: left;
    margin: 0 auto;
}

.processing-view.visible {
    display: block;
    animation: processingReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes processingReveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
        filter: blur(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.processing-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 70px;
    align-items: start;
}

@media (max-width: 900px) {
    .processing-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .status-column {
        position: static;
    }
}

.steps-column {
    display: flex;
    flex-direction: column;
}

.status-column {
    position: sticky;
    top: 20px;
}

.terminal-header {
    font-family: var(--font-mono);
    color: var(--accent-orange);
    margin-bottom: 36px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 2px;
    animation: terminalType 0.5s ease forwards;
    text-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
}

@keyframes terminalType {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.blink {
    animation: blinker 1s step-end infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* ===== STATUS CONTAINER ===== */
.status-container {
    --progress: 0%;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 28px;
    font-family: var(--font-mono);
    animation: statusFloat 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

/* Progress border using conic gradient */
.status-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: conic-gradient(var(--accent-orange) var(--progress),
            rgba(255, 255, 255, 0.07) var(--progress));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    transition: background 0.3s ease;
}

.status-container::after {
    content: attr(data-progress);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(249, 115, 22, 0.15);
    font-family: var(--font-mono);
    pointer-events: none;
    z-index: 0;
}

@keyframes statusFloat {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-item .label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 500;
}

.status-item .value {
    font-size: 1.3rem;
    color: var(--text-main);
    font-weight: 600;
    font-family: var(--font-mono);
    transition: all 0.3s ease;
}

.status-item .value.accent {
    color: var(--accent-orange);
    text-shadow: 0 0 15px rgba(249, 115, 22, 0.3);
}

/* ===== STEP LIST ===== */
.step-list {
    position: relative;
    padding-left: 20px;
    margin-top: 10px;
}

.step-item {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    opacity: 0.2;
    transform: translateX(-8px) scale(0.95);
    transform-origin: left center;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    align-items: flex-start;
    filter: blur(1px);
}

.step-item.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
}

.step-item.complete {
    opacity: 0.5;
    transform: translateX(0) scale(0.97);
    filter: blur(0);
}

.step-marker {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    z-index: 2;
    flex-shrink: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-marker .material-icons {
    font-size: 18px;
    display: none;
}

.step-item.active .step-marker {
    border-color: var(--accent-orange);
    background: var(--accent-orange);
    color: var(--accent-text);
    box-shadow:
        0 0 30px rgba(249, 115, 22, 0.4),
        0 0 60px rgba(249, 115, 22, 0.15);
    transform: scale(1.15);
    animation: activeMarkerPulse 2s ease-in-out infinite;
}

@keyframes activeMarkerPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(249, 115, 22, 0.3), 0 0 40px rgba(249, 115, 22, 0.1);
    }

    50% {
        box-shadow: 0 0 35px rgba(249, 115, 22, 0.5), 0 0 70px rgba(249, 115, 22, 0.2);
    }
}

.step-item.active .step-marker .material-icons {
    display: block;
}

.step-item.complete .step-marker {
    background: rgba(249, 115, 22, 0.15);
    border-color: rgba(249, 115, 22, 0.4);
    color: var(--accent-orange);
}

.step-item.complete .step-marker .material-icons {
    display: block;
    color: var(--accent-orange);
}

.step-text {
    padding-top: 2px;
}

.step-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 6px;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-item.active .step-title {
    font-size: 1.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--text-main), rgba(249, 115, 22, 0.6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(-8px);
}

.step-item.active .step-desc {
    opacity: 1;
    height: auto;
    margin-top: 8px;
    transform: translateY(0);
}

/* ===== THINKING INDICATOR ===== */
.thinking-container {
    display: none;
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(249, 115, 22, 0.06);
    border: 1px solid rgba(249, 115, 22, 0.1);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-orange);
    animation: thinkingPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes thinkingPop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.thinking-container.visible {
    display: block;
}

.thinking-label {
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.thinking-label .thinking-logo {
    height: 17px;
    width: auto;
    animation: thinkingPulse 2s ease-in-out infinite;
}

@keyframes thinkingPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

.thinking-dots {
    display: inline-flex;
    gap: 3px;
    margin-left: 4px;
}

.thinking-dots span {
    width: 4px;
    height: 4px;
    background: var(--accent-orange);
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes dotBounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.3;
    }

    40% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ===== VIDEO RESULT ===== */
.video-view {
    display: none;
    width: 100%;
}

.video-view.visible {
    display: block;
    animation: videoReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes videoReveal {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
        filter: blur(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.video-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 2;
}

.video-container:hover {
    box-shadow:
        0 50px 120px rgba(0, 0, 0, 0.9),
        0 0 50px rgba(249, 115, 22, 0.15);
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(249, 115, 22, 0.2);
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(6px);
    transition: all 0.4s ease;
}

.play-overlay:hover {
    background: rgba(0, 0, 0, 0.4);
}

.play-overlay .material-icons {
    color: white;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.play-overlay:hover .material-icons {
    transform: scale(1.2);
}

/* ===== STATS BAR ===== */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 32px;
    padding: 24px 48px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    backdrop-filter: blur(24px);
    animation: statsSlide 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    animation-delay: 0.2s;
    animation-fill-mode: backwards;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@keyframes statsSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: statPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.stat-item:nth-child(1) {
    animation-delay: 0.4s;
}

.stat-item:nth-child(2) {
    animation-delay: 0.5s;
}

.stat-item:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes statPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-icon {
    font-size: 20px;
    color: var(--accent-orange);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.stat-item:hover .stat-icon {
    opacity: 1;
    transform: scale(1.15);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stat-label {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 600;
}

/* ===== FEEDBACK ===== */
.feedback-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    animation: feedbackFade 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    animation-delay: 0.3s;
    animation-fill-mode: backwards;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes feedbackFade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.feedback-question {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.feedback-buttons {
    display: flex;
    gap: 10px;
}

.feedback-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.feedback-btn:hover {
    transform: translateY(-2px) scale(1.1);
    color: var(--text-main);
}

.feedback-btn.thumb-up:hover,
.feedback-btn.thumb-up.voted {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.25);
    color: var(--accent-orange);
}

.feedback-btn.thumb-down:hover,
.feedback-btn.thumb-down.voted {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.feedback-btn .material-icons {
    font-size: 18px;
}

.feedback-btn.voted {
    pointer-events: none;
    transform: scale(0.9);
    opacity: 0.5;
}

.feedback-btn.voted.active-vote {
    opacity: 1;
    transform: scale(1.1);
}

.feedback-details {
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feedback-details.visible {
    max-height: 300px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.feedback-tags-sleek {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.tag-sleek {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.tag-sleek:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.tag-sleek.active {
    background: var(--accent-orange);
    color: black;
    border-color: transparent;
    font-weight: 600;
}

.feedback-input-sleek {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 12px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    resize: none;
    min-height: 40px;
    outline: none;
}

.feedback-input-sleek:focus {
    border-color: rgba(249, 115, 22, 0.3);
}

.feedback-actions-sleek {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.sleek-btn {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.sleek-btn.primary {
    background: var(--accent-orange);
    color: black;
}

.sleek-btn.secondary {
    background: transparent;
    color: var(--text-muted);
}

.sleek-btn:hover {
    transform: translateY(-1px);
}

.feedback-thanks {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--accent-orange);
    font-weight: 500;
}

@keyframes thanksPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.feedback-thanks.hidden {
    display: none;
}

/* ===== RESULT ACTIONS ===== */
.result-actions {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.audio-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(249, 115, 22, 0.06);
    border: 1px solid rgba(249, 115, 22, 0.15);
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--accent-orange);
    animation: badgeGlow 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgeGlow {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.audio-badge .material-icons {
    font-size: 18px;
}

.audio-badge.hidden {
    display: none !important;
}

.new-chat-btn {
    font-family: var(--font-sans);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 24px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.new-chat-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.new-chat-btn:hover {
    border-color: rgba(249, 115, 22, 0.3);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.new-chat-btn:hover::before {
    opacity: 1;
}

.new-chat-btn .material-icons {
    font-size: 18px;
}

/* ===== TUTORIAL MODAL ===== */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(16px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.tutorial-overlay.hidden {
    display: none;
}

.tutorial-modal {
    background: rgba(18, 18, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 44px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: modalPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.tutorial-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.4), transparent);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(30px);
        filter: blur(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.tutorial-icon {
    font-size: 64px;
    color: var(--accent-orange);
    margin-bottom: 24px;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-12px) rotate(3deg);
    }
}

.tutorial-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 14px;
    background: linear-gradient(135deg, var(--text-main), rgba(249, 115, 22, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tutorial-text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 32px;
}

.tutorial-steps {
    text-align: left;
    margin-bottom: 32px;
}

.tut-step {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    align-items: flex-start;
    opacity: 0;
    animation: tutStepIn 0.5s ease forwards;
}

.tut-step:nth-child(1) {
    animation-delay: 0.3s;
}

.tut-step:nth-child(2) {
    animation-delay: 0.4s;
}

.tut-step:nth-child(3) {
    animation-delay: 0.5s;
}

.tut-step:nth-child(4) {
    animation-delay: 0.6s;
}

@keyframes tutStepIn {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tut-step-num {
    background: linear-gradient(135deg, var(--accent-orange), #ea580c);
    color: var(--accent-text);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(249, 115, 22, 0.2);
}

.tut-step-text {
    color: var(--text-main);
    font-size: 0.93rem;
    line-height: 1.5;
}

.tutorial-btn {
    background: linear-gradient(135deg, var(--accent-orange), #ea580c);
    color: var(--accent-text);
    border: none;
    padding: 14px 44px;
    border-radius: 14px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.tutorial-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.25) 50%, transparent 60%);
    animation: btnShine 3s ease-in-out infinite;
}

@keyframes btnShine {

    0%,
    100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

.tutorial-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 40px rgba(249, 115, 22, 0.35);
}

.tutorial-btn:active {
    transform: scale(0.97);
}

/* ===== ERRORS ===== */
.error-banner {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    animation: errorShake 0.6s cubic-bezier(.36, .07, .19, .97) both;
    backdrop-filter: blur(8px);
}

@keyframes errorShake {
    0% {
        transform: translateX(0);
    }

    10% {
        transform: translateX(-6px);
    }

    20% {
        transform: translateX(6px);
    }

    30% {
        transform: translateX(-4px);
    }

    40% {
        transform: translateX(4px);
    }

    50% {
        transform: translateX(-2px);
    }

    60% {
        transform: translateX(2px);
    }

    100% {
        transform: translateX(0);
    }
}

.error-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.error-content .material-icons {
    color: #ef4444;
    font-size: 32px;
    animation: errorPulse 1.5s ease-in-out infinite;
}

@keyframes errorPulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.error-text {
    flex: 1;
}

.error-text strong {
    display: block;
    color: #ef4444;
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.error-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.retry-btn {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-family: var(--font-sans);
}

.retry-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.15);
}

.error-step .step-dot {
    background: #ef4444 !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4) !important;
}

.error-step .step-title {
    color: #ef4444 !important;
}

.error-step .step-desc {
    color: rgba(239, 68, 68, 0.8) !important;
}

/* ===== FOOTER AREA ===== */
.footer {
    font-family: var(--font-sans);
    text-align: center;
    padding: 20px;
    color: #333;
    font-size: 0.8rem;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== SCROLLBAR (for textarea) ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== SELECTION ===== */
::selection {
    background: rgba(249, 115, 22, 0.25);
    color: var(--text-main);
}

/* ===== FOOTER (fixed overlap) ===== */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(to top, var(--bg) 60%, transparent);
    pointer-events: none;
    z-index: 5;
    flex-wrap: wrap;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    pointer-events: all;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: rgba(249, 115, 22, 0.6);
}

.footer-dot {
    color: rgba(255, 255, 255, 0.15);
}

/* ===== MOBILE RESPONSIVE ===== */

@media (max-width: 900px) {
    .processing-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .status-column {
        position: static;
        order: -1;
    }

    .status-container {
        padding: 20px;
    }

    .status-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 14px 16px;
    }

    .logo {
        font-size: 1.25rem;
        gap: 8px;
    }

    .logo-img {
        height: 26px;
    }

    .header-signin-btn {
        padding: 7px 12px;
        font-size: 0.78rem;
        gap: 6px;
    }

    .header-signin-btn span.material-icons {
        font-size: 14px;
    }

    .account-btn {
        width: 34px;
        height: 34px;
    }

    .main-container {
        padding: 24px 16px 0;
    }

    .hero-section {
        margin-bottom: 2rem;
        transform: none !important;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.15;
    }

    .hero-title .highlight {
        padding: 1px 10px;
    }

    .hero-subtitle {
        font-size: 0.92rem;
    }

    .input-wrapper {
        padding: 16px;
        border-radius: 16px;
    }

    .input-area {
        font-size: 0.95rem;
        min-height: 56px;
    }

    .input-tools {
        margin-top: 14px;
        padding-top: 14px;
        gap: 8px;
    }

    .audio-chip .chip-content {
        padding: 7px 12px;
        font-size: 0.8rem;
        gap: 6px;
    }

    .audio-chip .chip-content span:last-child {
        display: none;
    }

    .tool-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .submit-btn {
        height: 38px;
        padding: 0 16px;
        border-radius: 10px;
    }

    .submit-btn::before {
        font-size: 0.85rem;
    }

    .examples-container {
        margin-top: 24px;
        gap: 8px;
    }

    .example-pill {
        padding: 7px 14px;
        font-size: 0.78rem;
    }

    .terminal-header {
        font-size: 0.9rem;
        margin-bottom: 24px;
        gap: 6px;
    }

    .step-item {
        gap: 16px;
        margin-bottom: 28px;
    }

    .step-marker {
        width: 28px;
        height: 28px;
    }

    .step-marker .material-icons {
        font-size: 15px;
    }

    .step-title {
        font-size: 1.15rem;
    }

    .step-item.active .step-title {
        font-size: 1.4rem;
    }

    .step-desc {
        font-size: 0.82rem;
    }

    .status-container {
        padding: 18px;
        border-radius: 14px;
    }

    .status-item .label {
        font-size: 0.6rem;
        letter-spacing: 0.8px;
    }

    .status-item .value {
        font-size: 1.1rem;
    }

    .video-container {
        border-radius: 12px;
    }

    .stats-bar {
        gap: 12px;
        padding: 12px 14px;
        border-radius: 12px;
        flex-wrap: nowrap;
    }

    .stat-icon {
        font-size: 16px;
    }

    .stat-label {
        font-size: 0.55rem;
        letter-spacing: 0.6px;
    }

    .stat-value {
        font-size: 0.82rem;
    }

    .feedback-section {
        flex-direction: column;
        gap: 10px;
        padding: 14px 16px;
        border-radius: 12px;
    }

    .feedback-question {
        font-size: 0.85rem;
    }

    .feedback-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .result-actions {
        margin-top: 18px;
        gap: 10px;
    }

    .audio-badge {
        padding: 8px 14px;
        font-size: 0.8rem;
        gap: 6px;
    }

    .new-chat-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
        border-radius: 12px;
        width: 100%;
        justify-content: center;
    }

    .site-footer {
        font-size: 0.6rem;
        padding: 10px 12px;
        gap: 5px;
        flex-direction: column;
    }

    .footer-dot {
        display: none;
    }

    .tutorial-modal {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .tutorial-icon img {
        height: 48px !important;
    }

    .tutorial-title {
        font-size: 1.4rem;
    }

    .tutorial-text {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }

    .tut-step {
        gap: 10px;
        margin-bottom: 14px;
    }

    .tut-step-num {
        width: 22px;
        height: 22px;
        font-size: 0.72rem;
    }

    .tut-step-text {
        font-size: 0.85rem;
    }

    .tutorial-btn {
        padding: 12px 32px;
        font-size: 0.92rem;
        border-radius: 12px;
        width: 100%;
        justify-content: center;
    }

    /* Mobile settings modal adjustments */
    .settings-modal {
        max-height: 95vh;
        width: 95% !important;
    }

    .settings-header {
        padding: 24px 20px 12px;
    }

    .settings-content {
        padding: 0 20px;
        margin-bottom: 16px;
    }

    .settings-actions {
        padding: 12px 20px 24px;
    }

    #authGate>div {
        padding: 20px !important;
        border-radius: 14px !important;
    }

    .thinking-container {
        padding: 8px 10px;
        font-size: 0.7rem;
    }

    .thinking-label .thinking-logo {
        height: 14px;
    }
}


@media (max-width: 380px) {
    .main-container {
        padding: 32px 14px 0;
    }

    .hero-section {
        margin-bottom: 2rem;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .input-area {
        font-size: 0.9rem;
        min-height: 48px;
    }

    .example-pill {
        padding: 6px 12px;
        font-size: 0.72rem;
    }

    .stats-bar {
        gap: 8px;
        padding: 10px 10px;
    }

    .stat-icon {
        display: none;
    }

    .stat-value {
        font-size: 0.75rem;
    }

    .stat-label {
        font-size: 0.5rem;
    }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .site-footer {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .tutorial-modal {
        margin-bottom: env(safe-area-inset-bottom);
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        margin-bottom: 1rem;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        display: none;
    }

    .main-container {
        padding-top: 10px;
    }

    .header {
        padding: 10px 16px;
    }

    .examples-container {
        margin-top: 12px;
    }
}

/* ===== HEADER SIGN-IN BUTTON ===== */
.header-signin-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.03));
    border: 1px solid rgba(249, 115, 22, 0.25);
    border-radius: 999px;
    color: var(--accent-orange);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.1);
}

.header-signin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.header-signin-btn::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-orange), #ea580c, var(--accent-orange));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    filter: blur(8px);
}

.header-signin-btn:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(249, 115, 22, 0.08));
    border-color: rgba(249, 115, 22, 0.5);
    transform: translateY(-2px) scale(1.03);
    box-shadow:
        0 8px 25px rgba(249, 115, 22, 0.2),
        0 0 40px rgba(249, 115, 22, 0.1);
    color: #fff;
}

.header-signin-btn:hover::before {
    left: 100%;
}

.header-signin-btn:hover::after {
    opacity: 0.4;
}

.header-signin-btn .material-icons {
    font-size: 18px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.header-signin-btn:hover .material-icons {
    transform: rotate(15deg) scale(1.1);
}

.header-signin-btn .signin-pulse {
    width: 6px;
    height: 6px;
    background: var(--accent-orange);
    border-radius: 50%;
    animation: signinPulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--accent-orange);
}

@keyframes signinPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

/* ===== AUTH GATE MODAL ===== */
#authGate {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    animation: authGateFadeIn 0.5s ease;
}

@keyframes authGateFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.auth-modal {
    width: min(480px, calc(100% - 32px));
    background: linear-gradient(165deg, rgba(30, 30, 30, 0.95), rgba(15, 15, 15, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    animation: authModalPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@keyframes authModalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.auth-modal::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.3), transparent 40%, transparent 60%, rgba(249, 115, 22, 0.15));
    z-index: -1;
    animation: borderRotate 8s linear infinite;
}

@keyframes borderRotate {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

.auth-modal::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(249, 115, 22, 0.3) 0%, transparent 100%),
        radial-gradient(2px 2px at 70% 60%, rgba(249, 115, 22, 0.2) 0%, transparent 100%),
        radial-gradient(2px 2px at 40% 80%, rgba(249, 115, 22, 0.25) 0%, transparent 100%),
        radial-gradient(2px 2px at 80% 20%, rgba(249, 115, 22, 0.15) 0%, transparent 100%);
    animation: floatParticles 20s linear infinite;
    pointer-events: none;
}

@keyframes floatParticles {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(-20px, -20px) rotate(360deg);
    }
}

.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.auth-logo {
    height: 56px;
    width: auto;
    filter: drop-shadow(0 0 20px rgba(249, 115, 22, 0.3));
    animation: authLogoFloat 3s ease-in-out infinite;
}

@keyframes authLogoFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(3deg);
    }
}

.auth-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(135deg, var(--text-main), rgba(249, 115, 22, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 32px;
}

.google-signin-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    color: var(--text-main);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.google-signin-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.google-signin-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.google-signin-btn:hover {
    border-color: rgba(249, 115, 22, 0.4);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(249, 115, 22, 0.1);
}

.google-signin-btn:hover::before {
    opacity: 1;
}

.google-signin-btn:hover::after {
    transform: translateX(100%);
}

.google-signin-btn:active {
    transform: scale(0.98);
}

.google-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.google-signin-btn:hover .google-icon {
    transform: rotate(15deg) scale(1.15);
}

.google-signin-btn .material-icons {
    font-size: 22px;
    color: var(--accent-orange);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.google-signin-btn:hover .material-icons {
    transform: rotate(360deg);
    text-shadow: 0 0 15px rgba(249, 115, 22, 0.5);
}

.auth-benefits {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-benefit {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0;
    animation: benefitSlide 0.5s ease forwards;
}

.auth-benefit:nth-child(1) {
    animation-delay: 0.3s;
}

.auth-benefit:nth-child(2) {
    animation-delay: 0.4s;
}

.auth-benefit:nth-child(3) {
    animation-delay: 0.5s;
}

@keyframes benefitSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-benefit .material-icons {
    font-size: 16px;
    color: var(--accent-orange);
}

.auth-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    color: #ef4444;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    display: none;
    animation: errorShake 0.5s ease;
}

@media (max-width: 600px) {
    .header-signin-btn {
        padding: 8px 14px;
        font-size: 0.78rem;
        gap: 6px;
    }

    .header-signin-btn span:not(.material-icons):not(.signin-pulse) {
        display: none;
    }

    .header-signin-btn .signin-pulse {
        display: none;
    }

    .auth-modal {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .auth-logo {
        height: 48px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-subtitle {
        font-size: 0.88rem;
        margin-bottom: 24px;
    }

    .google-signin-btn {
        padding: 14px 20px;
        font-size: 0.92rem;
        border-radius: 14px;
    }

    .auth-benefits {
        margin-top: 20px;
        padding-top: 18px;
    }

    .auth-benefit {
        font-size: 0.8rem;
    }
}

/* ===== LIBRARY SIDEBAR ===== */
.library-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.library-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.library-sidebar {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100vh;
    background: #0d1117;
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2001;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.8);
}

.library-sidebar.open {
    left: 0;
}

.library-header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.library-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.library-title .material-icons {
    color: var(--accent-orange);
}

.library-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.library-close-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: rotate(90deg);
}

.library-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.library-loading,
.library-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    color: var(--text-muted);
    text-align: center;
    gap: 16px;
}

.library-spinner {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(249, 115, 22, 0.1);
    border-top-color: var(--accent-orange);
    border-radius: 50%;
    animation: libSpinner 0.8s linear infinite;
}

@keyframes libSpinner {
    to {
        transform: rotate(360deg);
    }
}

.library-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.library-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.library-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(249, 115, 22, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.library-item-question {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.library-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.library-item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.library-item-date {
    margin-left: auto;
    opacity: 0.6;
}

.library-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.library-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .library-sidebar {
        width: 100vw;
        left: -100vw;
    }

    .library-sidebar.open {
        left: 0;
    }
}

/* ===== QUOTA MODAL ===== */
.quota-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.quota-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.quota-modal {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.quota-overlay.visible .quota-modal {
    transform: scale(1);
}

.quota-icon {
    font-size: 64px;
    color: var(--accent-orange);
    margin-bottom: 24px;
}

.quota-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

.quota-text {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 32px;
}

.quota-btn {
    background: var(--accent-orange);
    color: black;
    border: none;
    padding: 14px 32px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.quota-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.2);
}

/* ===== TRIAL TOAST ===== */
.trial-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(249, 115, 22, 0.3);
    padding: 12px 24px;
    border-radius: 999px;
    color: white;
    font-size: 0.9rem;
    z-index: 2500;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.trial-toast.visible {
    transform: translateX(-50%) translateY(0);
}

.trial-toast .material-icons {
    color: var(--accent-orange);
    font-size: 18px;
}

/* ===== SETTINGS MODAL ===== */
.settings-modal {
    max-width: 480px;
    max-height: 90vh;
    text-align: left;
    display: flex;
    flex-direction: column;
    padding: 0; /* Header, content, actions will have their own padding */
}

.settings-header {
    padding: 32px 40px 16px;
    flex-shrink: 0;
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 40px;
    margin-bottom: 24px;
}

/* Custom scrollbar for settings content */
.settings-content::-webkit-scrollbar {
    width: 6px;
}

.settings-content::-webkit-scrollbar-track {
    background: transparent;
}

.settings-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.settings-actions {
    padding: 16px 40px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(13, 17, 23, 0.95);
    border-radius: 0 0 24px 24px;
    flex-shrink: 0;
}

.transaction-history-list {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-meta {
    display: flex;
    flex-direction: column;
}

.transaction-date {
    font-size: 11px;
    color: var(--text-muted);
}

.transaction-amount {
    font-weight: 600;
}

.transaction-amount.negative {
    color: #ff4d4d;
}

.transaction-amount.positive {
    color: #4dff4d;
}

.settings-header {
    text-align: center;
}

.settings-header .quota-icon {
    margin-bottom: 12px;
}

.settings-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.settings-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.settings-section-title .material-icons {
    color: var(--accent-orange);
    font-size: 20px;
}

.settings-section-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.voice-select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-family: var(--font-sans);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    transition: all 0.2s;
}

.voice-select:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background-color: rgba(0, 0, 0, 0.5);
}

.voice-select:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.voice-select option {
    background: #0d1117;
    color: white;
    padding: 12px;
}

/* Theme Carousel */
.theme-carousel-container {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    margin-top: 10px;
}

.theme-carousel {
    display: flex;
    gap: 12px;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding: 4px;
    flex: 1;
}

.theme-item {
    min-width: 100px;
    height: 70px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    position: relative;
}

.theme-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.theme-item.active {
    border-color: var(--accent-orange);
    background: rgba(249, 115, 22, 0.1);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.15);
}

.theme-preview-box {
    width: 40px;
    height: 24px;
    border-radius: 4px;
    margin-bottom: 6px;
    background: var(--bg);
    display: flex;
    padding: 3px;
    gap: 2px;
}

.theme-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.theme-name {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-item.active .theme-name {
    color: var(--accent-orange);
}

.carousel-nav {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.settings-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.settings-actions .quota-btn {
    padding: 12px 28px;
}

.settings-actions .quota-btn.primary {
    background: var(--accent-orange);
    color: black;
}

.settings-actions .quota-btn:not(.primary) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* ===== CANCEL BUTTON ===== */
.processing-actions {
    margin-top: 32px;
    display: flex;
    justify-content: flex-start;
}

.cancel-btn {
    background: rgba(239, 68, 68, 0.06);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.15);
    padding: 10px 20px;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cancel-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.1);
}

.cancel-btn:active {
    transform: scale(0.96);
}

.cancel-btn .material-icons {
    font-size: 18px;
}

@keyframes rotating {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.rotating {
    animation: rotating 1.5s linear infinite;
}

/* ===== GUIDED TOUR ===== */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    pointer-events: none;
    transition: opacity 0.3s;
}

.tour-overlay.hidden {
    opacity: 0;
    display: none;
}

.tour-arrow {
    position: absolute;
    width: 80px;
    height: 80px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    z-index: 10000;
}

.tour-arrow svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.tour-label {
    position: absolute;
    color: white;
    font-family: 'Oregano', cursive;
    font-size: 24px;
    font-style: italic;
    white-space: nowrap;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 10000;
}

.tour-next-btn {
    position: absolute;
    padding: 12px 24px;
    background: rgba(249, 115, 22, 0.85); /* Translucent orange */
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10001;
}

.tour-next-btn:hover {
    transform: translateY(-2px);
    background: var(--accent-hover);
}