/**
 * Instagram Reel Downloader - Main Stylesheet
 * Premium Instagram-inspired design
 */

/* ===== CSS Variables ===== */
:root {
    --gradient-start: #f09433;
    --gradient-mid1: #e6683c;
    --gradient-mid2: #dc2743;
    --gradient-mid3: #cc2366;
    --gradient-end: #bc1888;
    --gradient: linear-gradient(45deg, var(--gradient-start), var(--gradient-mid1), var(--gradient-mid2), var(--gradient-mid3), var(--gradient-end));
    --primary-color: #dc2743;
    --text-dark: #262626;
    --text-muted: #8e8e8e;
    --bg-light: #fafafa;
    --bg-section: #f5f5f5;
    --border-color: #dbdbdb;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --surface: #ffffff;
    --surface-muted: #f7f7f8;
    --ink: #141414;
    --ink-soft: #5c5c5c;
}

/* Dark Mode Variables */
[data-bs-theme="dark"],
.dark-mode {
    --text-dark: #f5f5f5;
    --text-muted: #a8a8a8;
    --bg-light: #1a1a1a;
    --bg-section: #121212;
    --border-color: #363636;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* ===== Base Styles ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    background-color: #fff;
    line-height: 1.65;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[data-bs-theme="dark"] body,
.dark-mode body {
    background-color: #121212;
    color: var(--text-dark);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--gradient-mid3);
}

/* ===== Typography ===== */
.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.section-lead {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
}

.section-head {
    margin-bottom: 2.75rem;
}

.section-pad {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}

.section-muted {
    background: var(--surface-muted);
}

[data-bs-theme="dark"] .section-muted,
.dark-mode .section-muted {
    background: #161616;
}

/* ===== Buttons ===== */
.btn-gradient {
    background: var(--gradient);
    color: #fff !important;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.4);
    color: #fff !important;
}

.btn-gradient:active {
    transform: translateY(0);
}

.bg-gradient {
    background: var(--gradient) !important;
}

/* ===== Navbar ===== */
#mainNavbar {
    transition: var(--transition);
    padding: 0.75rem 0;
}

#mainNavbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.brand-icon {
    font-size: 1.75rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-text {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.dark-mode-toggle {
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    padding: 3.5rem 0 3.75rem;
    overflow: hidden;
    background: linear-gradient(
        135deg,
        #f09433 0%,
        #e6683c 18%,
        #dc2743 42%,
        #cc2366 68%,
        #bc1888 88%,
        #833ab4 100%
    );
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 12% 18%, rgba(255, 255, 255, 0.22), transparent 55%),
        radial-gradient(ellipse 55% 45% at 88% 12%, rgba(255, 200, 120, 0.25), transparent 50%),
        radial-gradient(ellipse 60% 50% at 70% 90%, rgba(0, 0, 0, 0.12), transparent 55%);
    pointer-events: none;
}

[data-bs-theme="dark"] .hero-section,
.dark-mode .hero-section {
    background: linear-gradient(
        135deg,
        #c46a1a 0%,
        #b83d28 20%,
        #9e1c38 45%,
        #8a1850 70%,
        #6b1470 100%
    );
}

[data-bs-theme="dark"] .hero-bg,
.dark-mode .hero-bg {
    background:
        radial-gradient(ellipse 70% 55% at 12% 18%, rgba(255, 255, 255, 0.1), transparent 55%),
        radial-gradient(ellipse 60% 50% at 70% 90%, rgba(0, 0, 0, 0.25), transparent 55%);
}

.hero-downloader {
    margin-top: 2rem;
}

.hero-eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
}

.hero-eyebrow a {
    color: rgba(255, 255, 255, 0.82);
}

.hero-eyebrow a:hover {
    color: #fff;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
    color: #fff;
    background: none;
    -webkit-text-fill-color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.92);
    max-width: 36rem;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.12);
}

.hero-subtitle strong {
    color: #fff;
    font-weight: 700;
}

[data-bs-theme="dark"] .hero-subtitle strong,
.dark-mode .hero-subtitle strong {
    color: #fff;
}

/* ===== Feature / step / support tiles ===== */
.feature-tile,
.support-tile {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.feature-tile:hover,
.support-tile:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

[data-bs-theme="dark"] .feature-tile,
[data-bs-theme="dark"] .support-tile,
.dark-mode .feature-tile,
.dark-mode .support-tile {
    background: #1e1e1e;
}

.feature-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(240, 148, 51, 0.14), rgba(188, 24, 136, 0.14));
    color: var(--primary-color);
    font-size: 1.35rem;
    margin: 0 auto 1rem;
}

.feature-title,
.support-title,
.step-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    text-align: center;
}

.feature-text,
.support-text,
.step-text {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 0;
    line-height: 1.55;
}

.support-icon {
    font-size: 1.75rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.steps-row {
    position: relative;
}

@media (min-width: 768px) {
    .steps-row::before {
        content: "";
        position: absolute;
        top: 3.35rem;
        left: calc(16.666% + 1.5rem);
        right: calc(16.666% + 1.5rem);
        height: 2px;
        background: linear-gradient(
            90deg,
            rgba(240, 148, 51, 0.35),
            rgba(220, 39, 67, 0.55),
            rgba(188, 24, 136, 0.35)
        );
        z-index: 0;
        pointer-events: none;
    }
}

.step-tile {
    position: relative;
    z-index: 1;
    height: 100%;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem 1.5rem 1.75rem;
    text-align: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.step-tile:hover {
    border-color: rgba(220, 39, 67, 0.28);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

[data-bs-theme="dark"] .step-tile,
.dark-mode .step-tile {
    background: #1e1e1e;
    box-shadow: none;
}

.step-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.15rem;
}

.step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 1.5rem;
    padding: 0 0.65rem;
    margin-bottom: 0.85rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #fff;
    background: var(--gradient);
    box-shadow: 0 6px 16px rgba(220, 39, 67, 0.28);
}

.step-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(240, 148, 51, 0.12), rgba(188, 24, 136, 0.14));
    color: var(--primary-color);
    font-size: 1.65rem;
    border: 1px solid rgba(220, 39, 67, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

[data-bs-theme="dark"] .step-icon-wrap,
.dark-mode .step-icon-wrap {
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.08);
}

.step-title {
    margin-bottom: 0.55rem;
}

.step-text {
    max-width: 18rem;
    margin-left: auto;
    margin-right: auto;
}

.faq-accordion .faq-item {
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: #fff;
}

[data-bs-theme="dark"] .faq-accordion .faq-item,
.dark-mode .faq-accordion .faq-item {
    background: #1e1e1e;
}

.faq-accordion .accordion-button {
    font-weight: 600;
    font-size: 0.98rem;
    box-shadow: none !important;
    background: transparent;
}

.faq-accordion .accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background: transparent;
}

.faq-accordion .accordion-body {
    color: var(--text-muted);
    padding-top: 0;
}

.seo-article h2 {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.seo-article h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.seo-article p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.seo-article code {
    font-size: 0.9em;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: var(--bg-light);
    color: var(--primary-color);
}

.page-header {
    padding: 1.25rem 0 2.25rem;
    background:
        radial-gradient(ellipse 70% 80% at 50% 0%, rgba(240, 148, 51, 0.1), transparent 60%),
        var(--bg-light);
}

.page-header-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.page-header-lead {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 36rem;
    margin: 0 auto;
}

.prose-page h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
}

.prose-page h2:first-child {
    margin-top: 0;
}

.prose-page p,
.prose-page li {
    color: var(--text-muted);
}

.contact-aside .contact-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(240, 148, 51, 0.14), rgba(188, 24, 136, 0.14));
    color: var(--primary-color);
    font-size: 1.15rem;
}

.contact-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.contact-value {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
}

.contact-note {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.contact-form-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

[data-bs-theme="dark"] .contact-form-card,
.dark-mode .contact-form-card {
    background: #1e1e1e;
}

.cta-section {
    padding: 4rem 0;
    background: var(--gradient);
    color: #fff;
}

.cta-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.cta-text {
    opacity: 0.9;
    font-size: 1.05rem;
    max-width: 28rem;
    margin: 0 auto 1.5rem;
}

.btn-cta-light {
    background: #fff;
    color: #1a1a1a !important;
    border: none;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.75rem 1.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-cta-light:hover {
    background: #f7f7f7;
    color: #1a1a1a !important;
    transform: translateY(-1px);
}

.brand-text {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-dark);
}

/* ===== Downloader ===== */
.downloader-card {
    border-radius: 20px !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    box-shadow:
        0 4px 6px rgba(188, 24, 136, 0.04),
        0 18px 48px rgba(220, 39, 67, 0.12) !important;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

[data-bs-theme="dark"] .downloader-card,
.dark-mode .downloader-card {
    background: rgba(30, 30, 30, 0.92);
    border-color: var(--border-color) !important;
}

.download-toolbar {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.65rem;
}

.download-url-field {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.download-url-field .url-field-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 2;
}

.download-url-field .form-control {
    width: 100%;
    min-height: 52px;
    height: 52px;
    padding: 0.75rem 6.5rem 0.75rem 2.75rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    background: #fff;
    color: var(--text-dark);
    box-shadow: none;
}

.download-url-field .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 39, 67, 0.12);
}

/* Paste sits inside the input on the right */
.download-url-field .btn-paste {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    height: 38px;
    min-height: 38px;
    padding: 0 0.85rem;
    border: none;
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(240, 148, 51, 0.12), rgba(188, 24, 136, 0.12));
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: var(--transition);
}

.download-url-field .btn-paste:hover {
    color: #fff;
    background: var(--gradient);
}

.download-url-field .btn-paste.is-pasted {
    color: #fff;
    background: var(--gradient);
}

.download-form .download-submit,
.download-form .btn-gradient.download-submit {
    flex: 0 0 auto;
    min-height: 52px;
    padding: 0.75rem 1.35rem;
    border-radius: 12px;
    white-space: nowrap;
}

[data-bs-theme="dark"] .download-url-field .form-control,
.dark-mode .download-url-field .form-control {
    background: #2a2a2a;
    border-color: var(--border-color);
    color: var(--text-dark);
}

[data-bs-theme="dark"] .download-url-field .btn-paste,
.dark-mode .download-url-field .btn-paste {
    background: rgba(255, 255, 255, 0.08);
    color: #ff8fb0;
}

.supported-types {
    text-align: center;
}

.supported-types-label {
    margin: 0 0 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.supported-types-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
}

.supported-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem 0.35rem 0.4rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    color: var(--text-dark);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: var(--transition);
}

.supported-type-chip:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
    background-image: linear-gradient(#fff, #fff), var(--gradient);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.supported-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(240, 148, 51, 0.12), rgba(188, 24, 136, 0.12));
}

.supported-type-icon svg {
    width: 16px;
    height: 16px;
}

.result-thumbnail {
    width: 64px;
    height: 64px;
    object-fit: cover;
}

.result-media {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}

.result-video {
    display: block;
    max-height: 480px;
    background: #000;
    object-fit: contain;
}

.result-photo {
    display: block;
    max-height: 480px;
    object-fit: contain;
    margin: 0 auto;
}

.result-carousel {
    position: relative;
}

.carousel-track {
    position: relative;
    min-height: 200px;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}

.carousel-slide {
    display: none;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img,
.carousel-slide video {
    max-height: 480px;
    width: 100%;
    object-fit: contain;
    background: #000;
}

.result-meta .text-muted {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.download-result .result-card {
    animation: fadeInUp 0.4s ease;
}

/* ===== Feature Cards ===== */
.feature-card {
    border-radius: var(--radius) !important;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md) !important;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(240, 148, 51, 0.1), rgba(188, 24, 136, 0.1));
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* ===== Steps ===== */
.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto;
}

.step-card {
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-3px);
}

/* ===== Supported Cards ===== */
.supported-icon {
    font-size: 2.5rem;
    display: block;
}

.supported-card {
    border-radius: var(--radius) !important;
    transition: var(--transition);
}

.supported-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md) !important;
}

/* ===== FAQ ===== */
.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, rgba(240, 148, 51, 0.08), rgba(188, 24, 136, 0.08));
    color: var(--text-dark);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-item {
    border-radius: var(--radius) !important;
    overflow: hidden;
}

/* ===== Benefits ===== */
.benefits-list li {
    font-size: 1.05rem;
}

.placeholder-graphic {
    border-radius: var(--radius-lg);
}

/* ===== SEO Content ===== */
.seo-article h2 {
    font-size: 1.75rem;
    color: var(--text-dark);
}

.seo-article h3 {
    font-size: 1.35rem;
    color: var(--text-dark);
}

.seo-article h4 {
    font-size: 1.15rem;
    color: var(--text-dark);
}

.seo-article p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.8;
}

.seo-article ul {
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.seo-article li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* ===== Legal Content ===== */
.legal-content h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.legal-content h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
}

.legal-content p,
.legal-content li {
    color: var(--text-muted);
    line-height: 1.8;
}

/* ===== Contact ===== */
.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(240, 148, 51, 0.1), rgba(188, 24, 136, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ===== Footer ===== */
.site-footer {
    position: relative;
    background: #12121a;
    color: rgba(255, 255, 255, 0.78);
    padding: 3.5rem 0 0;
    overflow: hidden;
}

.footer-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
}

.footer-main {
    padding-bottom: 2.75rem;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #fff;
}

.footer-brand:hover {
    color: #fff;
}

.footer-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    color: #fff;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(220, 39, 67, 0.3);
}

.footer-brand-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 22rem;
    margin-bottom: 0.85rem;
}

.footer-domain {
    display: inline-block;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-domain:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.25rem;
}

.footer-social-link {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-social-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
    transform: translateY(-2px);
}

.footer-heading {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.footer-links {
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.58);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-supported-lead {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin-bottom: 0.85rem;
}

.footer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding: 1.25rem 0 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-copy,
.footer-disclaimer {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.footer-disclaimer {
    text-align: right;
}

@media (max-width: 767.98px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-disclaimer {
        text-align: center;
    }
}

/* Legacy class kept for print / older refs */
.footer {
    background: #12121a !important;
}

/* ===== Scroll to Top ===== */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ===== CTA Section ===== */
.cta-section {
    border-radius: 0;
}

/* ===== Newsletter ===== */
.newsletter-form .form-control {
    border-radius: var(--radius);
    max-width: 300px;
}

/* ===== Breadcrumbs ===== */
.breadcrumb-nav {
    padding: 1.15rem 0 0;
    background:
        radial-gradient(ellipse 70% 80% at 50% -20%, rgba(240, 148, 51, 0.1), transparent 55%),
        var(--bg-light);
    border-bottom: none;
}

[data-bs-theme="dark"] .breadcrumb-nav,
.dark-mode .breadcrumb-nav {
    background:
        radial-gradient(ellipse 70% 80% at 50% -20%, rgba(220, 39, 67, 0.12), transparent 55%),
        #121212;
}

.site-breadcrumb {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    padding: 0.4rem 0.55rem 0.4rem 0.45rem;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(220, 39, 67, 0.12);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    list-style: none;
}

[data-bs-theme="dark"] .site-breadcrumb,
.dark-mode .site-breadcrumb {
    background: rgba(30, 30, 30, 0.92);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.breadcrumb-nav .container {
    display: flex;
    justify-content: center;
}

.site-breadcrumb .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    float: none;
    padding: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.site-breadcrumb .breadcrumb-item + .breadcrumb-item {
    padding-left: 0;
}

.site-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "\f285";
    font-family: "bootstrap-icons";
    font-size: 0.65rem;
    color: rgba(142, 142, 142, 0.9);
    padding: 0 0.35rem;
    float: none;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
}

.breadcrumb-link i {
    font-size: 0.85rem;
    color: var(--primary-color);
}

.breadcrumb-link:hover {
    color: var(--primary-color);
    background: rgba(220, 39, 67, 0.08);
}

.breadcrumb-current {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    color: #fff;
    background: var(--gradient);
    box-shadow: 0 6px 14px rgba(220, 39, 67, 0.22);
}

/* ===== Page Header ===== */
.page-header {
    border-bottom: 1px solid var(--border-color);
}

/* ===== Animations ===== */
.fade-in {
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Toast ===== */
.toast-container .toast {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

/* ===== Error Pages ===== */
.error-page {
    background: var(--bg-light);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0 2.5rem;
    }

    .hero-downloader {
        margin-top: 1.5rem;
    }

    .download-toolbar {
        flex-direction: column;
        gap: 0.7rem;
    }

    .download-url-field {
        width: 100%;
    }

    .download-url-field .form-control {
        width: 100% !important;
        min-height: 52px !important;
        height: 52px !important;
        font-size: 16px !important;
        padding-right: 5.75rem !important;
        border: 1.5px solid var(--border-color) !important;
        background: #fff !important;
        border-radius: 12px !important;
    }

    .download-url-field .btn-paste {
        height: 36px;
        min-height: 36px;
        padding: 0 0.75rem;
        right: 6px;
    }

    .download-form .download-submit {
        width: 100%;
        min-height: 50px;
        border-radius: 12px !important;
    }

    .supported-types-list {
        gap: 0.4rem;
    }

    .supported-type-chip {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem 0.3rem 0.3rem;
    }

    .supported-type-icon {
        width: 24px;
        height: 24px;
    }

    .supported-type-icon svg {
        width: 14px;
        height: 14px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }

    .newsletter-form {
        flex-direction: column !important;
    }

    .newsletter-form .form-control {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.85rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 0.25rem;
    }

    .downloader-card .card-body {
        padding: 1.15rem !important;
    }

    .download-url-field .form-control {
        padding-right: 3.25rem !important;
    }

    .download-url-field .btn-paste .paste-label {
        display: none;
    }

    .download-url-field .btn-paste {
        width: 38px;
        min-width: 38px;
        padding: 0;
    }
}

/* ===== Dark Mode Overrides ===== */
[data-bs-theme="dark"] .navbar,
.dark-mode .navbar {
    background-color: #1a1a1a !important;
}

[data-bs-theme="dark"] .bg-light,
.dark-mode .bg-light {
    background-color: var(--bg-section) !important;
}

[data-bs-theme="dark"] .card,
.dark-mode .card {
    background-color: #1e1e1e;
    color: var(--text-dark);
}

[data-bs-theme="dark"] .form-control,
.dark-mode .form-control {
    background-color: #2a2a2a;
    border-color: var(--border-color);
    color: var(--text-dark);
}

[data-bs-theme="dark"] .supported-type-chip,
.dark-mode .supported-type-chip {
    background-color: #2a2a2a;
    color: var(--text-dark);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .supported-type-chip:hover,
.dark-mode .supported-type-chip:hover {
    background-image: linear-gradient(#2a2a2a, #2a2a2a), var(--gradient);
}

[data-bs-theme="dark"] .supported-type-icon,
.dark-mode .supported-type-icon {
    background: linear-gradient(135deg, rgba(240, 148, 51, 0.2), rgba(188, 24, 136, 0.2));
}

[data-bs-theme="dark"] .accordion-button,
.dark-mode .accordion-button {
    background-color: #1e1e1e;
    color: var(--text-dark);
}

[data-bs-theme="dark"] .download-result .result-card,
.dark-mode .download-result .result-card {
    background-color: #2a2a2a !important;
}

/* ===== Language select (Bootstrap-style) ===== */
.lang-select-wrap {
    position: relative;
    min-width: 148px;
}

.lang-select {
    border-radius: 999px !important;
    border: 1px solid var(--border-color) !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    padding: 0.35rem 2rem 0.35rem 0.85rem !important;
    background-color: #fff !important;
    color: var(--text-dark) !important;
    box-shadow: none !important;
    cursor: pointer;
    line-height: 1.4;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.7rem center !important;
    background-size: 12px 10px !important;
}

.lang-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 39, 67, 0.15) !important;
}

.lang-select option {
    font-weight: 500;
    color: #212529;
    background: #fff;
    padding: 0.5rem;
}

[data-bs-theme="dark"] .lang-select,
.dark-mode .lang-select {
    background-color: #2a2a2a !important;
    color: var(--text-dark) !important;
    border-color: var(--border-color) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ccc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.7rem center !important;
    background-size: 12px 10px !important;
}

[data-bs-theme="dark"] .lang-select option,
.dark-mode .lang-select option {
    background: #2a2a2a;
    color: #f5f5f5;
}

/* Hide Google Translate default chrome */
.google-translate-host {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-te-spinner-pos {
    display: none !important;
}

body {
    top: 0 !important;
}

.skiptranslate iframe.skiptranslate,
body > .skiptranslate {
    display: none !important;
}

@media (max-width: 991.98px) {
    .lang-select-wrap {
        margin: 0.75rem 0 0.25rem;
        min-width: 100%;
    }

    .lang-select {
        width: 100%;
    }
}

/* ===== Google Translate (legacy wrap kept safe) ===== */
.google-translate-wrap {
    display: none;
}

/* ===== Print ===== */
@media print {
    .navbar, .footer, .site-footer, .scroll-top-btn, .cta-section, .newsletter-section {
        display: none !important;
    }
}
