/* ===== Design System ===== */
:root {
    /* === Brand Colors === */
    --primary: #FF4103;
    --primary-light: #FF6B3D;
    --primary-dark: #CC3300;
    --primary-glow: rgba(255, 65, 3, 0.3);

    --accent-green: #FF6B3D;
    --accent-orange: #FF4103;
    --accent-yellow: #FF8C5A;
    --accent-blue: #FF4103;

    /* === Backgrounds === */
    --bg-primary: #001621;
    --bg-secondary: #001E2D;
    --bg-tertiary: #00263A;
    --bg-card: #001E2D;
    --bg-card-hover: #002A3D;
    --bg-input: #001A27;

    /* === Text === */
    --text-primary: #FFFFFF;
    --text-secondary: #A0B8C8;
    --text-tertiary: #6B8FA0;
    --text-muted: #4A6A7A;

    /* === Borders === */
    --border: rgba(255, 65, 3, 0.12);
    --border-hover: rgba(255, 65, 3, 0.25);
    --border-active: rgba(255, 65, 3, 0.5);

    /* === Shadows === */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(255, 65, 3, 0.25);

    /* === Radius === */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* === Transitions === */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video {
    max-width: 100%;
    display: block;
}

.hidden {
    display: none !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 65, 3, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(108, 92, 231, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-white {
    background: white;
    color: var(--primary-dark);
    font-weight: 700;
}

.btn-white:hover {
    background: #1A0800;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 27, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 65, 3, 0.15);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 65, 3, 0.3);
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    padding: 120px 24px 80px;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

.hero-orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: #FF6B3D;
    bottom: -150px;
    left: -100px;
    animation-delay: 3s;
}

.hero-orb-3 {
    width: 300px;
    height: 300px;
    background: var(--primary-light);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 5s;
    opacity: 0.15;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 65, 3, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 65, 3, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 65, 3, 0.12);
    border: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-light);
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.hero-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-light), #FF6B3D, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Features ===== */
.features {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 65, 3, 0.12);
    border: 1px solid rgba(255, 65, 3, 0.2);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent, var(--primary)), transparent);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 65, 3, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    color: var(--accent, var(--primary-light));
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== How it Works ===== */
.how-it-works {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.steps-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.step-card {
    flex: 1;
    min-width: 250px;
    max-width: 320px;
    text-align: center;
    padding: 32px;
    position: relative;
}

.step-number {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(255, 65, 3, 0.15), rgba(255, 65, 3, 0.05));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 20px;
}

.step-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 65, 3, 0.1);
    border: 1px solid rgba(255, 65, 3, 0.2);
    border-radius: var(--radius-lg);
    margin: 0 auto 20px;
    color: var(--primary-light);
}

.step-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.step-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-connector {
    display: flex;
    align-items: center;
    padding-top: 90px;
    color: var(--text-muted);
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 100px 0;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-xl);
    padding: 80px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
}

.cta-orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
}

.cta-orb-1 {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    top: -100px;
    right: -50px;
    filter: blur(40px);
}

.cta-orb-2 {
    width: 200px;
    height: 200px;
    background: rgba(0, 184, 148, 0.3);
    bottom: -80px;
    left: -30px;
    filter: blur(40px);
}

.cta-card h2 {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.cta-card p {
    font-size: 17px;
    opacity: 0.85;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.cta-card .btn {
    position: relative;
    z-index: 1;
}

/* ===== Footer ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-brand p {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-tertiary);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Dashboard ===== */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 64px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.usage-card {
    background: linear-gradient(135deg, #001E2D, #002A3D);
    border: 1px solid rgba(255, 65, 3, 0.2);
    border-radius: var(--radius-md);
    padding: 20px;
}

.usage-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.usage-icon {
    font-size: 18px;
}

.usage-title {
    font-size: 14px;
    font-weight: 600;
}

.usage-info {
    margin-bottom: 16px;
}

.usage-status {
    font-size: 13px;
    color: var(--text-tertiary);
}

.usage-status.active {
    color: var(--accent-green);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 8px 12px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(255, 65, 3, 0.12);
    color: var(--primary-light);
    border: 1px solid rgba(255, 65, 3, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 32px;
    max-width: 900px;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.content-header h1 {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-actions {
    display: flex;
    gap: 8px;
}

/* ===== Upload Zone ===== */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 65, 3, 0.05), transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(255, 65, 3, 0.05);
}

.upload-zone:hover::before,
.upload-zone.dragover::before {
    opacity: 1;
}

.upload-zone.dragover {
    transform: scale(1.01);
    box-shadow: 0 0 40px rgba(255, 65, 3, 0.15);
}

.upload-zone-content {
    position: relative;
    z-index: 1;
}

.upload-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.upload-icon-bg {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(255, 65, 3, 0.15), transparent);
    border-radius: 50%;
    animation: pulse-bg 3s ease-in-out infinite;
}

@keyframes pulse-bg {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.2;
    }
}

.upload-icon {
    color: var(--primary-light);
}

.upload-zone h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.upload-zone p {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.upload-formats {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.format-tag {
    padding: 4px 12px;
    background: rgba(255, 65, 3, 0.08);
    border: 1px solid rgba(255, 65, 3, 0.15);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.5px;
}

/* ===== File Preview ===== */
.file-preview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
}

.file-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 65, 3, 0.1);
    border-radius: var(--radius-sm);
    color: var(--primary-light);
}

.file-details {
    flex: 1;
}

.file-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.file-size {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ===== Settings Card ===== */
.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}

.settings-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.setting-item label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.setting-item select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237B7BA0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.setting-item select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 65, 3, 0.15);
}

/* ===== Loading Overlay ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 27, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 40px;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-radius: 50%;
}

.spinner-ring:nth-child(1) {
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    inset: 8px;
    border-right-color: var(--primary-light);
    animation: spin 1.5s linear infinite reverse;
}

.spinner-ring:nth-child(3) {
    inset: 16px;
    border-bottom-color: var(--accent-green);
    animation: spin 2s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.loading-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent-green));
    border-radius: var(--radius-full);
    width: 0%;
    transition: width 0.5s ease;
}

.loading-sub {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 27, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 0;
}

.modal-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 65, 3, 0.12);
    border-radius: var(--radius-sm);
    color: var(--primary-light);
}

.modal-header h2 {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px 24px;
}

.modal-body>p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 44px 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    transition: var(--transition);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 65, 3, 0.15);
}

.toggle-visibility {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.toggle-visibility:hover {
    color: var(--text-primary);
}

.api-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: rgba(108, 92, 231, 0.06);
    border: 1px solid rgba(255, 65, 3, 0.12);
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    font-size: 12px;
}

.api-info svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--primary-light);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 24px;
}

/* ===== History ===== */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.empty-state svg {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.history-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.history-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 184, 148, 0.1);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.history-icon svg {
    color: var(--accent-green);
}

.history-details {
    flex: 1;
    min-width: 0;
}

.history-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-meta {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    gap: 12px;
}

.history-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-green);
}

.history-status .dot {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
}

/* ===== Results ===== */
.result-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.result-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.result-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 65, 3, 0.03);
}

.result-section-header h2 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.result-text {
    padding: 24px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

.result-text::-webkit-scrollbar {
    width: 6px;
}

.result-text::-webkit-scrollbar-track {
    background: transparent;
}

.result-text::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.result-text::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

.copy-result {
    background: rgba(0, 184, 148, 0.03);
    padding: 16px;
}

/* ===== Copy Output Formatting ===== */
.copy-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    opacity: 0.5;
    padding: 12px 8px 4px;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    margin-bottom: 2px;
}

.copy-label:first-child {
    padding-top: 0;
}

.copy-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 65, 3, 0.15), transparent);
    margin: 16px 0;
    user-select: none;
    pointer-events: none;
}

.copy-block {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    margin: 2px 0;
}

.copy-block:hover {
    background: rgba(108, 92, 231, 0.06);
}

.copy-block-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    cursor: text;
}

.copy-block-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(255, 65, 3, 0.08);
    border: 1px solid rgba(255, 65, 3, 0.15);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    opacity: 0;
    transform: scale(0.8);
    margin-top: 2px;
}

.copy-block:hover .copy-block-btn {
    opacity: 1;
    transform: scale(1);
}

.copy-block-btn:hover {
    background: rgba(255, 65, 3, 0.2);
    border-color: rgba(108, 92, 231, 0.4);
    color: var(--primary-light);
}

.copy-block-btn.copied {
    background: rgba(0, 184, 148, 0.2);
    border-color: rgba(0, 184, 148, 0.4);
    color: var(--accent-green);
    opacity: 1;
    transform: scale(1);
}

/* Regenerate Section */
.regenerate-section {
    text-align: center;
}

.regen-options {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.regen-select {
    padding: 8px 36px 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237B7BA0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.regen-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    max-width: 360px;
}

.toast.success {
    border-left: 3px solid var(--accent-green);
}

.toast.error {
    border-left: 3px solid #E74C3C;
}

.toast.info {
    border-left: 3px solid var(--primary);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }

    .hero {
        padding: 80px 20px 60px;
        min-height: auto;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-value {
        font-size: 22px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .step-connector {
        display: none;
    }

    .steps-grid {
        flex-direction: column;
        align-items: center;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        padding: 20px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .cta-card {
        padding: 40px 24px;
    }
}