/* ============================================
   PinSave — Pinterest Video Downloader
   Header · Banner · Tool · How to use · FAQs · Footer
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg-deep: #0a0a0c;
    --bg-elevated: #121216;
    --bg-card: rgba(22, 22, 28, 0.9);
    --bg-card-border: rgba(255, 255, 255, 0.06);
    --bg-input: rgba(255, 255, 255, 0.04);
    --bg-input-focus: rgba(255, 255, 255, 0.08);

    --accent: #e60023;
    --accent-hover: #ff1a3d;
    --accent-glow: rgba(230, 0, 35, 0.35);
    --accent-muted: rgba(230, 0, 35, 0.15);

    --text-primary: #f5f5f7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --success-bg: rgba(34, 197, 94, 0.12);
    --success-text: #4ade80;
    --success-border: rgba(34, 197, 94, 0.25);
    --error-bg: rgba(239, 68, 68, 0.12);
    --error-text: #f87171;
    --error-border: rgba(239, 68, 68, 0.25);
    --info-bg: rgba(59, 130, 246, 0.12);
    --info-text: #60a5fa;
    --info-border: rgba(59, 130, 246, 0.25);

    --save-bg: #16a34a;
    --save-hover: #22c55e;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
    --shadow-btn: 0 4px 14px 0 rgba(230, 0, 35, 0.4);

    --header-height: 64px;
    --section-padding: clamp(48px, 8vw, 80px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* ========== HEADER ========== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--bg-card-border);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    transition: opacity 0.2s;
}

.header-logo:hover {
    opacity: 0.9;
}

.header-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(145deg, var(--accent) 0%, #c41230 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.header-logo .logo-icon svg {
    width: 20px;
    height: 20px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.header-nav a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

/* ========== BANNER ========== */
.banner {
    position: relative;
    min-height: 42vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(48px, 10vw, 96px) 24px;
    overflow: hidden;
}

.banner-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 70% at 50% 0%, rgba(230, 0, 35, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 80% 60%, rgba(120, 0, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 10% 80%, rgba(230, 0, 35, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.banner-content {
    position: relative;
    max-width: 640px;
    text-align: center;
}

.banner-badge {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-muted);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.banner-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.banner-desc {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.banner-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(145deg, var(--accent) 0%, #c41230 100%);
    border-radius: var(--radius-md);
    text-decoration: none;
    box-shadow: var(--shadow-btn);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.banner-cta:hover {
    background: linear-gradient(145deg, var(--accent-hover) 0%, var(--accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

/* ========== SECTIONS COMMON ========== */
.section {
    padding: var(--section-padding) 24px;
}

.section-inner {
    max-width: 640px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.section-lead {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ========== TOOL SECTION ========== */
.tool-section {
    padding-top: 0;
    margin-top: -24px;
}

.tool-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-card);
}

.tool-header {
    margin-bottom: 24px;
}

.tool-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.tool-subtitle {
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#urlInput {
    width: 100%;
    padding: 16px 48px 16px 18px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

#urlInput::placeholder {
    color: var(--text-muted);
}

#urlInput:hover {
    background: var(--bg-input-focus);
}

#urlInput:focus {
    border-color: var(--accent);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.clear-btn {
    position: absolute;
    right: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.clear-btn.visible {
    display: flex;
}

.download-btn {
    background: linear-gradient(145deg, var(--accent) 0%, #c41230 100%);
    color: white;
    border: none;
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-btn);
}

.download-btn:hover:not(:disabled) {
    background: linear-gradient(145deg, var(--accent-hover) 0%, var(--accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.download-btn:active:not(:disabled) {
    transform: translateY(0);
}

.download-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.download-btn.loading .btn-text {
    display: none;
}

.download-btn.loading .btn-loader {
    display: block;
}

.btn-loader {
    display: none;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.status {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    display: none;
    border: 1px solid transparent;
}

.status.error {
    display: block;
    background: var(--error-bg);
    color: var(--error-text);
    border-color: var(--error-border);
}

.status.success {
    display: block;
    background: var(--success-bg);
    color: var(--success-text);
    border-color: var(--success-border);
}

.status.info {
    display: block;
    background: var(--info-bg);
    color: var(--info-text);
    border-color: var(--info-border);
}

.preview {
    margin-top: 24px;
    text-align: center;
}

.preview.hidden {
    display: none;
}

#videoPlayer {
    width: 100%;
    max-height: 360px;
    border-radius: var(--radius-md);
    background: #000;
    margin-bottom: 16px;
    border: 1px solid var(--bg-card-border);
}

.save-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--save-bg);
    color: white;
    text-decoration: none;
    padding: 14px 26px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-md);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.save-btn:hover {
    background: var(--save-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.save-btn svg {
    width: 20px;
    height: 20px;
}

/* ========== HOW TO USE ========== */
.how-section {
    background: var(--bg-elevated);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: start;
    padding: 24px 0;
    border-bottom: 1px solid var(--bg-card-border);
}

.step:last-child {
    border-bottom: none;
}

.step-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-muted);
    color: var(--accent);
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.step-body h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.step-body p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ========== FAQs ========== */
.faq-section .section-title {
    margin-bottom: 24px;
}

.faq-section .section-lead {
    display: none;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.faq-item {
    border-bottom: 1px solid var(--bg-card-border);
}

.faq-item:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.faq-item:last-child {
    border-bottom: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s;
}

.faq-question:hover {
    color: var(--accent);
}

.faq-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    position: relative;
    transition: transform 0.25s ease;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    border-radius: 2px;
}

.faq-icon::before {
    width: 12px;
    height: 2px;
    left: 4px;
    top: 9px;
}

.faq-icon::after {
    width: 2px;
    height: 12px;
    left: 9px;
    top: 4px;
    transition: transform 0.25s ease;
}

.faq-item[data-open="true"] .faq-icon::after {
    transform: scaleY(0);
}

.faq-answer {
    overflow: hidden;
    transition: height 0.25s ease;
}

.faq-answer p {
    padding: 0 0 20px 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ========== FOOTER (International) ========== */
.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--bg-card-border);
    padding: 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(200px, 280px) 1fr;
    gap: 48px 64px;
    padding: 56px 0 40px;
    align-items: start;
}

.footer-brand-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-brand:hover {
    opacity: 0.9;
}

.footer-brand .logo-icon.small {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(145deg, var(--accent) 0%, #c41230 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.footer-brand .logo-icon.small svg {
    width: 18px;
    height: 18px;
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    max-width: 240px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px 24px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-heading {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-region {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px 0 32px;
    border-top: 1px solid var(--bg-card-border);
}

.footer-copy {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: var(--text-secondary);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .footer-top {
        padding: 40px 0 32px;
        gap: 32px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 0 28px;
    }

    .footer-legal {
        gap: 20px;
    }
    .header-nav {
        gap: 4px;
    }

    .header-nav a {
        padding: 8px 10px;
        font-size: 0.875rem;
    }

    .tool-card {
        padding: 24px 20px;
    }

    .step {
        gap: 16px;
        padding: 20px 0;
    }

    .step-num {
        width: 36px;
        height: 36px;
        font-size: 0.9375rem;
    }
}
