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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
    text-decoration: none;
}

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

.header-nav a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* ===== Hero ===== */
.hero {
    padding: 80px 0 48px;
    text-align: center;
}

.hero-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 36px;
}

/* ===== Download Form ===== */
.download-form {
    max-width: 560px;
    margin: 0 auto;
}

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

.url-input {
    width: 100%;
    height: 56px;
    padding: 0 52px 0 20px;
    background: var(--bg-tertiary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.url-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.url-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.paste-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--surface);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.paste-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.download-btn {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--gradient);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.download-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.download-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.download-btn.loading .btn-text {
    display: none;
}

.download-btn.loading .btn-spinner {
    display: block;
}

.btn-spinner {
    display: none;
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===== Format Badges ===== */
.format-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.badge {
    padding: 4px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-weight: 500;
}

.badge-sep {
    opacity: 0.4;
}

/* ===== Error Message ===== */
.error-msg {
    max-width: 560px;
    margin: 16px auto 0;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-md);
    color: var(--error);
    font-size: 0.9rem;
    text-align: center;
    animation: fadeInUp 0.3s ease;
}

.error-msg.shake {
    animation: shake 0.4s ease;
}

/* ===== Result ===== */
.result-section {
    padding: 0 0 48px;
}

.result-card {
    background: rgba(20, 20, 22, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    animation: fadeInUp 0.4s ease;
}

.result-preview {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
    aspect-ratio: 16/9;
    background: var(--bg-tertiary);
}

.result-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.result-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
    border-radius: var(--radius-md);
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background 0.2s;
}

.play-overlay:hover {
    background: rgba(0, 0, 0, 0.15);
}

.result-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Result Metadata ===== */
.result-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.meta-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.meta-badge--video {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-hover);
}

.meta-badge--story {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.meta-badge--image {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.meta-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.result-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-row {
    display: flex;
    gap: 10px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

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

.btn-primary {
    flex: 1;
    background: var(--gradient);
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    color: #fff;
}

.btn-secondary {
    flex: 1;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--surface);
}

.btn-ghost.copied {
    color: var(--success);
    border-color: var(--success);
}

/* ===== How to Use ===== */
.how-section {
    padding: 64px 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step {
    text-align: center;
    padding: 28px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform 0.2s, box-shadow 0.2s;
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.step-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: var(--radius-md);
}

.step h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ===== FAQ ===== */
.faq-section {
    padding: 0 0 80px;
}

.faq-list {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-item summary {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
}

.faq-item[open] summary::after {
    content: '\2212';
}

.faq-item summary:hover {
    background: var(--bg-tertiary);
}

.faq-item p {
    padding: 0 20px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

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

.disclaimer {
    color: var(--text-secondary);
    font-size: 0.8rem;
    max-width: 500px;
    margin: 0 auto 12px;
    line-height: 1.5;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ===== Footer Navigation ===== */
.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-bottom: 16px;
}

.footer-nav a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* ===== Page Content (Policy/Info Pages) ===== */
.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 20px 80px;
}

.page-content__title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-content__updated {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 40px;
}

.page-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.page-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.page-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.page-content ul,
.page-content ol {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
    padding-left: 24px;
}

.page-content li {
    margin-bottom: 6px;
}

.page-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.page-content a:hover {
    color: var(--accent-hover);
}

/* ===== Contact Page ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 32px;
}

.contact-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.contact-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: var(--radius-md);
}

.contact-card__label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.contact-card__value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-card__value a {
    color: var(--text-primary);
    text-decoration: none;
}

.contact-card__value a:hover {
    color: var(--accent);
}

/* ===== Cookie Consent ===== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 16px 20px;
    display: none;
    animation: slideUp 0.3s ease;
}

.cookie-consent.show {
    display: block;
}

.cookie-consent__inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cookie-consent__text {
    flex: 1;
    min-width: 200px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.cookie-consent__text a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cookie-consent__btn {
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}

.cookie-consent__btn:hover {
    opacity: 0.85;
}

.cookie-consent__btn--accept {
    background: var(--gradient);
    color: #fff;
}

.cookie-consent__btn--decline {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ===== Download Tabs ===== */
.download-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 4px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.download-tabs__btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.download-tabs__btn:hover {
    color: var(--text-primary);
}

.download-tabs__btn--active {
    background: var(--gradient);
    color: #fff;
}

.download-tabs__btn--active:hover {
    color: #fff;
}

.tab-panel {
    display: none;
}

.tab-panel--active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* ===== Private Video Steps ===== */
.private-steps {
    max-width: 560px;
    margin: 0 auto;
}

.private-step {
    display: none;
}

.private-step--active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.private-step__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.private-step__number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    color: #fff;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.private-step__title {
    font-size: 1rem;
    font-weight: 600;
}

.private-step__desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.private-step__link {
    display: block;
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: 0.9rem;
    word-break: break-all;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.private-step__link:hover {
    border-color: var(--accent);
    color: var(--accent-hover);
}

.private-step__instructions {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 16px;
}

.private-step__instructions ol {
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.8;
}

.private-step__instructions li {
    margin-bottom: 4px;
}

.private-step__instructions kbd {
    display: inline-block;
    padding: 2px 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.source-textarea {
    width: 100%;
    min-height: 180px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 16px;
}

.source-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
    font-family: inherit;
}

.source-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.private-step__actions {
    display: flex;
    gap: 10px;
}

.private-step__actions .download-btn,
.private-step__actions .btn-back {
    flex: 1;
}

.btn-back {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-back:hover {
    background: var(--bg-tertiary);
}

.btn-next {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--gradient);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}

.btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

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

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* ===== Scroll behavior ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .hero {
        padding: 56px 0 36px;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .header-nav {
        gap: 16px;
    }

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

    .action-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .result-card {
        padding: 16px;
    }

    .page-content {
        padding: 40px 20px 60px;
    }

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

@media (min-width: 641px) and (max-width: 1024px) {
    .steps {
        gap: 16px;
    }
}
