/* ============================================================
   FastDownload.online — Premium CSS (v3)
   Fonts loaded via fonts.php in HTML (not @import — mobile safe)
   ============================================================ */

:root {
    --primary:       #6d28d9;
    --primary-light: #8b5cf6;
    --primary-dark:  #5b21b6;
    --pink:          #ec4899;
    --pink-dark:     #db2777;
    --dark:          #1e1b4b;
    --text:          #374151;
    --muted:         #6b7280;
    --bg:            #f5f3ff;
    --white:         #ffffff;
    --border:        #e2e8f0;
    --green:         #10b981;
    --green-dark:    #059669;
    font-size: 16px;
}

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

html { }

body {
    font-family: 'Outfit', system-ui, sans-serif;
    background: linear-gradient(160deg, #f5f3ff 0%, #fdf2f8 50%, #ffffff 100%);
    min-height: 100vh;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    overflow-x: hidden;
}

img { max-width:100%; height:auto; display:block; }


/* ── Skip link ── */
.skip-link {
    position: absolute; top: -100%; left: 0;
    background: var(--primary); color: #fff;
    padding: .75rem 1.5rem; border-radius: 0 0 8px 0;
    font-weight: 700; text-decoration: none; z-index: 9999;
    transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ── Focus visible ── */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }

/* ── Navbar — glassmorphism ── */
.navbar {
    position: sticky; top: 0; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 2rem;
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(109,40,217,.1);
    box-shadow: 0 1px 20px rgba(109,40,217,.04);
}

.logo {
    display: flex; align-items: center; gap:.3rem;
    font-size: 1.5rem; font-weight: 800;
    font-family: 'Josefin Sans', sans-serif;
}
.logo-icon-wrapper {
    color: var(--primary); font-size: 2rem;
    display: flex; align-items: center; margin-right: .3rem;
}
.logo-text   { color: var(--dark); }
.logo-highlight { color: var(--pink); }

.icon {
    width: 1.15em;
    height: 1.15em;
    display: inline-block;
    vertical-align: -0.15em;
    fill: currentColor;
    flex-shrink: 0;
}
.logo-icon-wrapper .icon { width: 2rem; height: 2rem; }
.faq-icon.icon { width: 1.1rem; height: 1.1rem; transition: transform .3s; }
.faq-item.active .faq-icon.icon { transform: rotate(180deg); }
.icon-spin { animation: spin 1s linear infinite; transform-origin: center; }

/* ── Hero ── */
.hero {
    position: relative; z-index: 1;
    max-width: 760px; margin: 5rem auto 3rem;
    text-align: center; padding: 0 1rem;
}

.main-title {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 3rem; font-weight: 800;
    line-height: 1.15; margin-bottom: .9rem;
    letter-spacing: -.5px;
}
.brand-blue { color: var(--primary); }
.brand-pink { color: var(--pink-dark); }
.brand-dark { color: #111827; }

.subtitle {
    color: #4b5563; font-size: 1.15rem;
    line-height: 1.7; margin-bottom: 2rem;
}

/* ── Tabs ── */
.tabs {
    display: flex; justify-content: center;
    gap: .75rem; margin-bottom: 1.8rem;
}
.tab-btn {
    background: var(--white);
    border: 2px solid var(--border);
    padding: .6rem 2rem; border-radius: 30px;
    font-size: 1rem; font-weight: 600; color: #64748b;
    cursor: pointer; transition: all .25s;
    font-family: 'Outfit', sans-serif;
}
.tab-btn:hover { border-color: #c4b5fd; color: var(--primary); }
.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: transparent; color: var(--white);
    box-shadow: 0 4px 16px rgba(109,40,217,.3);
}

/* ── Input ── */
.input-container {
    display: flex; align-items: center;
    background: var(--white);
    padding: .5rem;
    border-radius: 50px;
    box-shadow: 0 8px 30px rgba(109,40,217,.07);
    border: 1.5px solid var(--border);
    margin-bottom: 1.2rem;
    transition: all .3s;
}
.input-container:focus-within {
    box-shadow: 0 8px 30px rgba(109,40,217,.18);
    border-color: #c4b5fd;
    transform: translateY(-1px);
}
.url-input {
    flex: 1; border: none; outline: none;
    font-size: 1.1rem; color: var(--dark);
    background: transparent;
    padding: 0 1rem 0 1.25rem;
    font-family: 'Outfit', sans-serif;
}
.url-input::placeholder { color: #9ca3af; font-weight: 400; }

.paste-btn {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: var(--white); border: none;
    padding: .9rem 2.2rem; border-radius: 40px;
    font-size: 1rem; font-weight: 700;
    display: flex; align-items: center; gap: .5rem;
    cursor: pointer; transition: all .2s;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}
.paste-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(109,40,217,.35);
}

/* ── Trust badges ── */
.trust-badges {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: .6rem 1.2rem; margin: 1.4rem 0 .5rem;
}
.badge {
    display: inline-flex; align-items: center; gap: .4rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: .35rem 1rem;
    font-size: .85rem; font-weight: 600;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.badge i { color: var(--green); font-size: 1rem; }
.badge.badge-pink i { color: var(--pink); }
.badge.badge-blue i { color: var(--primary); }

/* ── Report / Error ── */
.report-issue {
    display: inline-flex; align-items: center; gap:.5rem;
    color: #9ca3af; font-size: .9rem;
    cursor: pointer; transition: color .3s;
    margin-top: .8rem;
}
.report-issue:hover { color: #4b5563; }

/* ── Result Container ── */
.result-container {
    margin-top: 2rem; z-index: 1; position: relative;
    display: flex; justify-content: center;
    flex-wrap: wrap; gap: 1.5rem;
}

.result-card {
    background: var(--white);
    border-radius: 1.5rem; padding: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
    border: 1px solid var(--border);
    width: 290px; flex-shrink: 0;
    transition: transform .3s;
}
.result-card:hover { transform: translateY(-4px); }

.video-preview {
    position: relative; border-radius: 1rem;
    overflow: hidden; aspect-ratio: 9/16; background: #000;
}
.video-preview img {
    width:100%; height:100%; object-fit: cover; opacity:.85;
    transition: opacity .3s;
}
.video-preview:hover img { opacity:.95; }

.play-overlay {
    position: absolute; top:50%; left:50%;
    transform: translate(-50%,-50%);
    font-size: 3.5rem;
    color: rgba(255,255,255,.92);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,.3));
}

.result-actions { margin-top: 1rem; }
.download-btn {
    display: flex; align-items: center; justify-content: center; gap:.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: var(--white); text-decoration: none;
    padding: 1rem; border-radius: 40px;
    font-size: 1rem; font-weight: 700; transition: all .2s;
    font-family: 'Outfit', sans-serif;
}
.download-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16,185,129,.35);
}

/* ── Spinner ── */
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ── How-to Section ── */
.how-to-container {
    position: relative; z-index: 1;
    max-width: 1060px; margin: 7rem auto; padding: 0 1.5rem;
}
.section-title {
    text-align: center; font-size: 2.2rem; font-weight: 800;
    margin-bottom: 4rem; color: var(--dark);
    font-family: 'Josefin Sans', sans-serif;
    position: relative;
}
.section-title::after {
    content:'';
    position: absolute; bottom:-14px; left:50%;
    transform: translateX(-50%);
    width: 60px; height: 4px; border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--pink));
}

.steps-grid {
    display: grid; grid-template-columns: repeat(3,1fr); gap: 2.5rem;
}
.step-card {
    background: rgba(255,255,255,.8);
    backdrop-filter: blur(10px);
    padding: 3rem 2rem 2.5rem;
    border-radius: 2rem; text-align: center;
    box-shadow: 0 15px 40px rgba(109,40,217,.06);
    border: 1px solid rgba(255,255,255,.9);
    transition: all .4s cubic-bezier(.175,.885,.32,1.275);
    position: relative;
}
.step-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(109,40,217,.13);
    border-color: rgba(109,40,217,.15);
}
.step-number {
    position: absolute; top:-25px; left:50%;
    transform: translateX(-50%);
    width:50px; height:50px;
    background: linear-gradient(135deg, var(--pink), #f472b6);
    color:#fff; border-radius: 18px;
    display:flex; align-items:center; justify-content:center;
    font-weight:800; font-size:1.4rem;
    box-shadow: 0 8px 20px rgba(236,72,153,.4);
}
.step-card h3 { font-size:1.3rem; margin: 1.25rem 0 .9rem; font-weight:700; color: var(--dark); }
.step-card p  { color:#64748b; font-size:.97rem; line-height:1.7; }

/* ── SEO Content ── */
.seo-content {
    position: relative; z-index:1;
    max-width: 920px; margin: 4rem auto;
    padding: 3rem; background: var(--white);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
    border: 1px solid var(--border);
}
.seo-content h2 { color: var(--primary); margin: 2rem 0 1rem; font-size:1.8rem; font-weight:800; }
.seo-content h2:first-child { margin-top: 0; }
.seo-content h3 { color: var(--text); margin: 1.5rem 0 .75rem; font-size:1.25rem; font-weight:700; }
.seo-content p  { color: var(--muted); line-height:1.8; margin-bottom:1.2rem; font-size:1.05rem; }
.seo-content ul { color: var(--muted); line-height:1.8; margin: 0 0 1.2rem 1.25rem; padding: 0; }
.seo-content li { margin-bottom: .5rem; }
.seo-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}
.seo-feature-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
}
.seo-feature-card strong { display: block; color: var(--primary); margin-bottom: .35rem; }

/* ── FAQ ── */
.faq-container {
    position: relative; z-index:1;
    max-width: 920px; margin: 6rem auto;
    padding: 0 1.5rem;
}
.faq-grid { display:flex; flex-direction:column; gap:1rem; }
.faq-item {
    background: var(--white); border-radius:1.2rem;
    border:1px solid var(--border); overflow:hidden;
    transition: all .3s;
}
.faq-question {
    width:100%; padding:1.5rem 2rem;
    display:flex; justify-content:space-between; align-items:center;
    background:none; border:none; text-align:left;
    cursor:pointer; font-size:1.05rem; font-weight:700;
    color: var(--dark); transition: all .3s;
    font-family: 'Outfit', sans-serif;
}
.faq-question:hover { background:#f8fafc; color: var(--primary); }
.faq-answer {
    max-height:0; overflow:hidden;
    transition: all .4s cubic-bezier(0,1,0,1);
    background:#fafafa;
}
.faq-answer-content {
    padding: 0 2rem 1.5rem;
    color: var(--muted); line-height:1.7; font-size:1rem;
}
.faq-item.active { border-color: var(--primary); box-shadow:0 8px 25px rgba(109,40,217,.08); }
.faq-item.active .faq-question { color: var(--primary); }
.faq-item.active .faq-answer { max-height:1000px; transition: all .4s cubic-bezier(1,0,1,0); }
.faq-icon { font-size:1.2rem; transition:transform .3s; }
.faq-item.active .faq-icon { transform:rotate(180deg); }

/* ── Footer ── */
footer {
    position: relative; z-index:1;
    text-align:center; padding:3rem 1rem;
    margin-top:4rem; border-top:1px solid #f1f5f9;
    color:#64748b; font-size:.95rem;
    background: rgba(255,255,255,.6);
    backdrop-filter: blur(10px);
}
.footer-nav {
    display:flex; justify-content:center; align-items:center;
    flex-wrap:wrap; gap: 8px 15px; margin-bottom:.8rem;
}
.footer-nav a {
    color: var(--primary); text-decoration:none;
    font-weight:600; font-size:.88rem;
    white-space:nowrap; transition:color .3s;
}
.footer-nav a:hover { color: var(--pink); }

/* ── CEO Badge ── */
.ceo-badge {
    margin:3rem auto 1rem;
    display:flex; flex-direction:column; align-items:center; gap:.8rem;
    background: var(--white); padding:1.5rem 2.5rem;
    border-radius:20px; border:1px solid var(--border);
    box-shadow:0 15px 35px -5px rgba(109,40,217,.06);
    max-width:350px; transition:transform .3s;
}
.ceo-badge:hover { transform: translateY(-4px); }

/* ── Modal ── */
.modal-overlay {
    position:fixed; inset:0;
    background:rgba(0,0,0,.45);
    backdrop-filter:blur(6px);
    display:none; justify-content:center; align-items:center;
    z-index:1000;
}
.modal-content {
    background:var(--white); padding:2.5rem;
    border-radius:2rem; width:90%; max-width:500px;
    position:relative; box-shadow:0 20px 60px rgba(0,0,0,.18);
}
.modal-header { margin-bottom:1.5rem; }
.modal-header h2 { font-size:1.8rem; color: var(--dark); font-family:'Josefin Sans',sans-serif; }
.modal-close {
    position:absolute; top:1.5rem; right:1.5rem;
    font-size:1.5rem; background:none; border:none;
    color: var(--muted); cursor:pointer; transition:color .2s;
}
.modal-close:hover { color: var(--dark); }
.report-form { display:flex; flex-direction:column; gap:1.2rem; }
.form-group { display:flex; flex-direction:column; gap:.5rem; }
.form-group label { font-weight:600; color:#4b5563; }
.form-input,.form-textarea,.form-select {
    padding:.8rem 1rem; border-radius:.8rem;
    border:1.5px solid var(--border);
    font-family:inherit; font-size:1rem; outline:none;
    transition:border-color .2s;
}
.form-input:focus,.form-textarea:focus,.form-select:focus { border-color: var(--primary); }
.form-textarea { resize:vertical; min-height:100px; }
.submit-report-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color:#fff; border:none; padding:1rem;
    border-radius:.8rem; font-weight:700;
    font-size:1.05rem; cursor:pointer; transition:all .3s;
    font-family:'Outfit',sans-serif;
}
.submit-report-btn:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(109,40,217,.3); }
.submit-report-btn:disabled { opacity:.55; cursor:not-allowed; transform:none; box-shadow:none; }

/* ── Rating modal ── */
.rating-modal { text-align: center; }
.rating-subtitle { color: var(--muted); font-size: 1rem; margin-top: .5rem; }
.rating-stars {
    display: flex; justify-content: center; gap: .35rem;
    margin: 1.5rem 0 .75rem;
}
.star-btn {
    background: none; border: none; cursor: pointer;
    font-size: 2.6rem; line-height: 1; color: #d1d5db;
    transition: color .15s, transform .15s;
    padding: .15rem;
}
.star-btn:hover, .star-btn.active { color: #f59e0b; transform: scale(1.08); }
.rating-hint { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.rating-actions {
    display: flex; flex-direction: column; gap: .75rem;
    margin-top: .5rem;
}
.rating-skip-btn {
    background: transparent; border: none;
    color: var(--muted); font-size: .95rem; font-weight: 600;
    cursor: pointer; padding: .5rem;
    font-family: 'Outfit', sans-serif;
}
.rating-skip-btn:hover { color: var(--primary); }
.rating-modal .form-group { text-align: left; }

/* ── Live chat ── */
.chat-modal {
    max-width: 440px; width: 94%;
    padding: 0; display: flex; flex-direction: column;
    max-height: 85vh;
}
.chat-modal .modal-close { z-index: 2; }
.chat-header {
    padding: 1.5rem 1.5rem .75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.chat-header h2 { font-size: 1.35rem; margin: 0; font-family: 'Josefin Sans', sans-serif; color: var(--dark); }
.chat-status { font-size: .85rem; color: var(--green); margin: .35rem 0 0; font-weight: 600; }
.chat-status-closed { color: #ef4444; }
.chat-name-row { padding: .75rem 1rem 0; }
.chat-messages {
    flex: 1; min-height: 220px; max-height: 340px;
    overflow-y: auto; padding: 1rem;
    background: #f8fafc; display: flex; flex-direction: column; gap: .65rem;
}
.chat-bubble {
    max-width: 85%; padding: .65rem .85rem;
    border-radius: 1rem; font-size: .92rem; line-height: 1.45;
}
.chat-bubble-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; border-bottom-right-radius: .25rem;
}
.chat-bubble-admin {
    align-self: flex-start;
    background: #fff; color: var(--text);
    border: 1px solid var(--border); border-bottom-left-radius: .25rem;
}
.chat-bubble-text { display: block; }
.chat-bubble-time { display: block; font-size: .7rem; opacity: .75; margin-top: .25rem; }
.chat-closed-notice {
    padding: .75rem 1rem; background: #fef2f2; color: #b91c1c;
    font-size: .88rem; text-align: center; font-weight: 600;
}
.chat-input-row {
    display: flex; gap: .5rem; padding: 1rem;
    border-top: 1px solid var(--border); background: #fff;
    border-radius: 0 0 2rem 2rem;
}
.chat-input { flex: 1; margin: 0; }
.chat-send-btn { padding: .75rem 1.25rem; font-size: .95rem; }

/* ── Page content (privacy/terms/dmca/security) ── */
.page-content {
    max-width: 820px; margin: 3rem auto;
    background: var(--white); padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,.05);
    border: 1px solid var(--border);
    text-align: left; position:relative; z-index:1;
}
.page-content h1 { color: var(--dark); margin-bottom:1.5rem; font-weight:800; font-size:2.2rem; font-family:'Josefin Sans',sans-serif; }
.page-content h2 { color: var(--primary); margin-top:2rem; margin-bottom:1rem; font-weight:700; font-size:1.2rem; }
.page-content p  { color:#4b5563; line-height:1.75; margin-bottom:1rem; }
.page-content ul { padding-left:1.5rem; margin-bottom:1rem; color:#4b5563; line-height:1.75; }
.page-content a  { color: var(--primary); }
.back-link { display:inline-flex; align-items:center; gap:.4rem; margin-bottom:1.5rem; color: var(--pink); text-decoration:none; font-weight:600; transition:gap .2s; }
.back-link:hover { gap:.8rem; }

/* ── Responsive ── */
@media (max-width:992px) {
    .steps-grid { grid-template-columns:1fr; gap:4rem; max-width:480px; margin:0 auto; }
}
@media (max-width:768px) {
    .navbar { padding:1rem; }
    .logo { font-size:1.2rem; }
    .logo-icon-wrapper { font-size:1.6rem; }
    .hero { margin:3rem auto; }
    .main-title { font-size:2.2rem; }
    .subtitle { font-size:1rem; }
    .seo-content { padding:1.5rem; margin:2rem 1rem; }
    .result-card { width:100%; max-width:310px; margin:0 auto; }
    .faq-question { padding:1.2rem 1.5rem; font-size:1rem; }
    .page-content { margin:2rem 1rem; padding:2rem 1.5rem; }
}
@media (max-width:480px) {
    .main-title { font-size:1.9rem; }
    .tabs { gap:.5rem; }
    .tab-btn { padding:.55rem 1.2rem; font-size:.9rem; }
    .input-container { border-radius:20px; flex-direction:column; background:transparent; border:none; box-shadow:none; gap:.8rem; padding:0; }
    .url-input { background:#fff; padding:1rem 1.5rem; border-radius:30px; border:1.5px solid var(--border); width:100%; box-shadow:0 4px 12px rgba(0,0,0,.04); }
    .paste-btn { width:100%; justify-content:center; border-radius:30px; padding:1rem; }
    .ceo-badge { padding:1.2rem 1.5rem; max-width:92%; margin:2rem auto; }
    .footer-nav { flex-direction:column; gap:5px; }
    .trust-badges { gap:.5rem; }
    .badge { font-size:.78rem; padding:.3rem .8rem; }
}

/* ── Accessibility ── */
@media (prefers-reduced-motion:reduce) {
    *,*::before,*::after {
        animation-duration:.01ms !important;
        animation-iteration-count:1 !important;
        transition-duration:.01ms !important;
        scroll-behavior:auto !important;
    }
    body::before, body::after { display:none; }
}
@media (prefers-contrast:high) {
    .tab-btn.active,.paste-btn { border:2px solid #000; }
}

/* ── GPU hints ── */
.input-container,.paste-btn,.tab-btn,.step-card,.download-btn,.result-card { will-change:transform; }
