
/* =========================================================
   EDITOAR — COMPLETE WEBSITE STYLESHEET
   Style: Clean, bright, modern creator tools
   Colors: White, lavender, soft purple, charcoal
   File: style.css
   ========================================================= */

/* ---------- 1. RESET & GLOBAL SETTINGS ---------- */

:root {
    --primary: #7657e8;
    --primary-dark: #6040d0;
    --primary-light: #f0ecff;
    --primary-soft: #f8f6ff;

    --background: #ffffff;
    --surface: #ffffff;
    --surface-soft: #faf9ff;

    --text: #202033;
    --text-secondary: #68687e;
    --text-muted: #9292a5;

    --border: #e9e7f2;
    --border-hover: #d5cbff;

    --success: #16865c;
    --danger: #dc4545;

    --shadow-sm: 0 3px 12px rgba(35, 25, 75, 0.04);
    --shadow-md: 0 10px 30px rgba(35, 25, 75, 0.08);
    --shadow-lg: 0 18px 50px rgba(35, 25, 75, 0.12);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 30px;

    --container-width: 1180px;
    --transition: 180ms ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    padding: 0;
    background: var(--background);
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img,
video,
canvas,
svg {
    max-width: 100%;
}

img {
    display: block;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    margin-top: 0;
    line-height: 1.25;
    letter-spacing: -0.035em;
}

::selection {
    background: #ded5ff;
    color: #282044;
}

:focus-visible {
    outline: 3px solid rgba(118, 87, 232, 0.35);
    outline-offset: 3px;
}


/* ---------- 2. MAIN LAYOUT ---------- */

.container,
.wrapper,
.page-container {
    width: min(var(--container-width), calc(100% - 48px));
    margin-inline: auto;
}

section {
    padding-block: 64px;
}

.section-heading {
    max-width: 680px;
    margin: 0 auto 32px;
    text-align: center;
}

.section-heading h2 {
    margin-bottom: 12px;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    font-weight: 750;
}

.section-heading p {
    margin-bottom: 0;
    color: var(--text-secondary);
}


/* ---------- 3. HEADER & NAVIGATION ---------- */

header,
.site-header,
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(233, 231, 242, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.navbar,
.nav-inner,
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
}

.logo,
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 1.55rem;
    font-weight: 850;
    letter-spacing: -0.06em;
}

.logo span,
.brand span {
    color: var(--primary);
}

.logo-icon,
.brand-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.93rem;
    font-weight: 600;
    transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}


/* ---------- 4. BUTTONS ---------- */

.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 19px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
    text-align: center;
    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.btn:hover,
button.btn:hover {
    transform: translateY(-2px);
    background: var(--primary-dark);
    box-shadow: 0 8px 20px rgba(118, 87, 232, 0.2);
}

.btn:active,
button.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    border-color: var(--border);
    background: #ffffff;
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--primary-soft);
    color: var(--primary-dark);
    box-shadow: none;
}

.btn-light {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.btn-light:hover {
    background: #e5ddff;
    color: var(--primary-dark);
    box-shadow: none;
}

.btn-danger {
    background: #fff0f0;
    color: var(--danger);
}

.btn-danger:hover {
    background: #ffe2e2;
    color: #b82727;
    box-shadow: none;
}

.btn-small {
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 9px;
    font-size: 0.86rem;
}

.btn-block {
    width: 100%;
}


/* ---------- 5. HERO / HOMEPAGE INTRO ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 86px 0 66px;
    background:
        radial-gradient(
            ellipse at 50% 0%,
            rgba(211, 199, 255, 0.36),
            transparent 62%
        ),
        linear-gradient(180deg, #fbfaff 0%, #ffffff 100%);
    text-align: center;
}

.hero::before,
.hero::after {
    position: absolute;
    z-index: 0;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(206, 193, 255, 0.12);
    content: "";
    pointer-events: none;
}

.hero::before {
    top: 35px;
    left: -150px;
}

.hero::after {
    right: -145px;
    bottom: -110px;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 850px;
    margin-inline: auto;
}

.hero-badge,
.eyebrow,
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 7px 13px;
    border: 1px solid #e4dcff;
    border-radius: 999px;
    background: #f5f1ff;
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 750;
}

.hero h1 {
    max-width: 850px;
    margin: 0 auto 20px;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 850;
    line-height: 1.08;
    letter-spacing: -0.065em;
}

.hero h1 .highlight,
.gradient-text {
    background: linear-gradient(100deg, #7657e8 10%, #a06eea 55%, #cf73c7 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    max-width: 670px;
    margin: 0 auto 28px;
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.hero-note {
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 0.86rem;
}


/* ---------- 6. SEARCH BAR ---------- */

.search-wrapper {
    position: relative;
    width: min(680px, 100%);
    margin: 32px auto 0;
}

.search-wrapper .search-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-bar,
#tool-search,
.search-input {
    width: 100%;
    min-height: 58px;
    padding: 15px 18px 15px 48px;
    border: 1px solid var(--border);
    border-radius: 16px;
    outline: none;
    background: #ffffff;
    color: var(--text);
    box-shadow: var(--shadow-md);
    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.search-bar:focus,
#tool-search:focus,
.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(118, 87, 232, 0.1);
}

.search-bar::placeholder,
#tool-search::placeholder,
.search-input::placeholder {
    color: #a1a0b0;
}


/* ---------- 7. CATEGORY FILTERS ---------- */

.category-filters,
.filter-tabs,
.categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 26px 0 34px;
}

.category-filter,
.filter-tab,
.category-btn {
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 650;
    transition: all var(--transition);
}

.category-filter:hover,
.filter-tab:hover,
.category-btn:hover {
    border-color: var(--border-hover);
    background: var(--primary-soft);
    color: var(--primary);
}

.category-filter.active,
.filter-tab.active,
.category-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}


/* ---------- 8. TOOLS GRID ---------- */

.tools-section {
    background: #ffffff;
}

.tools-grid,
.tool-grid,
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.card,
.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 25px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.card:hover,
.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.card h3,
.tool-card h3 {
    margin: 17px 0 9px;
    font-size: 1.13rem;
    font-weight: 750;
    letter-spacing: -0.025em;
}

.card p,
.tool-card p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.7;
}

.card .btn,
.tool-card .btn {
    align-self: flex-start;
    margin-top: auto;
}

.icon,
.tool-icon {
    display: grid;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 16px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.55rem;
}

.card:nth-child(4n + 2) .icon,
.tool-card:nth-child(4n + 2) .tool-icon {
    background: #eaf8f3;
    color: #16865c;
}

.card:nth-child(4n + 3) .icon,
.tool-card:nth-child(4n + 3) .tool-icon {
    background: #fff2e7;
    color: #cf772b;
}

.card:nth-child(4n + 4) .icon,
.tool-card:nth-child(4n + 4) .tool-icon {
    background: #eaf2ff;
    color: #3c70d7;
}

.card-badge,
.tool-badge {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 12px;
    padding: 4px 9px;
    border-radius: 7px;
    background: #f1edff;
    color: var(--primary-dark);
    font-size: 0.74rem;
    font-weight: 750;
}

.card.hidden,
.tool-card.hidden,
[hidden] {
    display: none !important;
}


/* ---------- 9. ADVERTISEMENT PLACEHOLDERS ---------- */

.ad-placeholder,
.ad-slot,
.ad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    padding: 18px;
    border: 1px dashed #d9d5e6;
    border-radius: var(--radius-md);
    background: #fcfbff;
    color: var(--text-muted);
    text-align: center;
}

.ad-placeholder span,
.ad-slot span,
.ad-container span {
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ad-placeholder p,
.ad-slot p,
.ad-container p {
    margin: 6px 0 0;
    font-size: 0.83rem;
}

.ad-banner {
    width: min(100%, 970px);
    min-height: 90px;
    margin: 25px auto;
}


/* ---------- 10. TOOL WORKSPACE ---------- */

.tool-workspace,
.editor-panel,
.workspace {
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.tool-header {
    margin-bottom: 26px;
}

.tool-header h1 {
    margin-bottom: 10px;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.tool-header p {
    color: var(--text-secondary);
}

.tool-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
    align-items: start;
    gap: 28px;
}

.tool-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tool-preview {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
}


/* ---------- 11. FORM ELEMENTS ---------- */

.form-group,
.field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.form-group label,
.field-group label,
label {
    color: var(--text);
    font-size: 0.91rem;
    font-weight: 700;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="file"],
textarea,
select {
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    background: #ffffff;
    color: var(--text);
    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(118, 87, 232, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #a2a0b2;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--primary);
}

input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

input[type="file"] {
    padding: 9px;
    background: var(--surface-soft);
}

.form-hint,
.field-hint {
    color: var(--text-muted);
    font-size: 0.83rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}


/* ---------- 12. TEXT COUNTER ---------- */

.counter-stats,
.stats-grid,
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-block: 20px;
}

.stat-card,
.counter-stat {
    padding: 17px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    text-align: center;
}

.stat-card strong,
.counter-stat strong {
    display: block;
    color: var(--primary-dark);
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.3;
}

.stat-card span,
.counter-stat span {
    color: var(--text-secondary);
    font-size: 0.8rem;
}


/* ---------- 13. TEXT OUTPUT / RESULTS ---------- */

.output-box,
.result-box,
.text-output {
    min-height: 120px;
    padding: 18px;
    overflow-wrap: anywhere;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    color: var(--text);
    white-space: pre-wrap;
}

.status-message,
.message {
    margin-top: 12px;
    padding: 10px 13px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.9rem;
}

.status-message.success,
.message.success {
    background: #eaf8f1;
    color: var(--success);
}

.status-message.error,
.message.error {
    background: #fff0f0;
    color: var(--danger);
}


/* ---------- 14. THUMBNAIL RESIZER ---------- */

.upload-area,
.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    padding: 25px;
    border: 2px dashed #d9d1f5;
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
    text-align: center;
    transition:
        border-color var(--transition),
        background var(--transition);
}

.upload-area:hover,
.drop-zone:hover {
    border-color: var(--primary);
    background: #f5f1ff;
}

.upload-area .icon,
.drop-zone .icon {
    margin-bottom: 12px;
}

.image-preview,
.thumbnail-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background:
        linear-gradient(45deg, #f0eef6 25%, transparent 25%),
        linear-gradient(-45deg, #f0eef6 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0eef6 75%),
        linear-gradient(-45deg, transparent 75%, #f0eef6 75%);
    background-position:
        0 0,
        0 10px,
        10px -10px,
        -10px 0;
    background-size: 20px 20px;
}

.image-preview img,
.thumbnail-preview img {
    max-height: 420px;
    object-fit: contain;
    border-radius: 5px;
}

.aspect-ratios {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.aspect-ratios button,
.ratio-button {
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #ffffff;
    color: var(--text-secondary);
    font-size: 0.87rem;
}

.aspect-ratios button.active,
.ratio-button.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
}


/* ---------- 15. FEATURE / ROADMAP SECTIONS ---------- */

.features-grid,
.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.feature-card,
.roadmap-card {
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #ffffff;
    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.feature-card:hover,
.roadmap-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-card h3,
.roadmap-card h3 {
    margin: 16px 0 9px;
    font-size: 1.12rem;
}

.feature-card p,
.roadmap-card p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 0.93rem;
}

.feature-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 13px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.3rem;
}


/* ---------- 16. BADGES & LABELS ---------- */

.badge,
.tag,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.76rem;
    font-weight: 750;
}

.badge.success {
    background: #e7f7ef;
    color: #16865c;
}

.badge.warning {
    background: #fff3dc;
    color: #94600a;
}

.badge.muted {
    background: #f0eff5;
    color: var(--text-secondary);
}


/* ---------- 17. FOOTER ---------- */

footer,
.site-footer {
    margin-top: 50px;
    padding: 48px 0 24px;
    border-top: 1px solid var(--border);
    background: #fbfaff;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 35px;
}

.footer-brand p {
    max-width: 330px;
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 0.91rem;
}

.footer-column h4 {
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.83rem;
}


/* ---------- 18. GENERAL UTILITIES ---------- */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-primary {
    color: var(--primary);
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.gap-3 {
    gap: 24px;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none !important;
}


/* ---------- 19. RESPONSIVE TABLETS ---------- */

@media (max-width: 900px) {
    .tools-grid,
    .tool-grid,
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .features-grid,
    .roadmap-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tool-layout {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .nav-links {
        gap: 17px;
    }

    section {
        padding-block: 52px;
    }

    .hero {
        padding-block: 68px 54px;
    }
}


/* ---------- 20. RESPONSIVE MOBILE ---------- */

@media (max-width: 600px) {
    .container,
    .wrapper,
    .page-container {
        width: calc(100% - 32px);
    }

    .navbar,
    .nav-inner,
    .header-inner {
        min-height: 66px;
        gap: 12px;
    }

    .logo,
    .brand {
        font-size: 1.35rem;
    }

    .logo-icon,
    .brand-icon {
        width: 34px;
        height: 34px;
    }

    .nav-links {
        gap: 12px;
        font-size: 0.82rem;
    }

    .nav-links a {
        font-size: 0.82rem;
    }

    .nav-actions .btn {
        min-height: 38px;
        padding: 7px 10px;
        font-size: 0.82rem;
    }

    .hero {
        padding: 58px 0 42px;
    }

    .hero h1 {
        font-size: clamp(2.15rem, 10vw, 3.2rem);
    }

    .hero p {
        font-size: 0.98rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
    }

    section {
        padding-block: 42px;
    }

    .section-heading {
        margin-bottom: 24px;
    }

    .tools-grid,
    .tool-grid,
    .cards-grid,
    .features-grid,
    .roadmap-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card,
    .tool-card,
    .feature-card,
    .roadmap-card {
        padding: 20px;
    }

    .category-filters,
    .filter-tabs,
    .categories {
        justify-content: flex-start;
        gap: 8px;
    }

    .category-filter,
    .filter-tab,
    .category-btn {
        padding: 8px 12px;
        font-size: 0.84rem;
    }

    .tool-workspace,
    .editor-panel,
    .workspace {
        padding: 18px;
    }

    .counter-stats,
    .stats-grid,
    .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .stat-card,
    .counter-stat {
        padding: 12px 5px;
    }

    .stat-card strong,
    .counter-stat strong {
        font-size: 1.3rem;
    }

    .stat-card span,
    .counter-stat span {
        font-size: 0.72rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .ad-placeholder,
    .ad-slot,
    .ad-container {
        min-height: 85px;
    }
}


/* ---------- 21. REDUCED MOTION ACCESSIBILITY ---------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile navigation */
.menu-toggle {
    display: none;
}

@media (max-width: 600px) {
    .navbar {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0 14px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 10px 4px;
    }

    .image-preview canvas {
        display: block;
        max-width: 100%;
        height: auto;
    }
}

/* =========================================
   EDITOAR: STYLES FOR JAVASCRIPT ELEMENTS
   ========================================= */

.editoar-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #ffffff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
}

.editoar-toast--info {
    background: #27243a;
}

.editoar-toast--success {
    background: #176c4b;
}

.editoar-toast--error {
    background: #a92d3a;
}

.editoar-download-link {
    display: none;
}

.editoar-copy-fallback {
    position: fixed;
    top: 0;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.editoar-image-preview {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Mobile navigation */
@media (max-width: 600px) {
    .menu-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0 14px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 10px 4px;
    }

    #thumbnail-canvas {
        display: block;
        max-width: 100%;
        height: auto;
    }
}

/* Hashtag Helper */
.hashtag-form {
    max-width: 760px;
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.hashtag-form label {
    font-weight: 600;
}

.hashtag-form textarea,
.hashtag-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ded9ec;
    border-radius: 12px;
    background: #ffffff;
    color: #29253a;
    font: inherit;
}

.hashtag-form textarea {
    resize: vertical;
    line-height: 1.6;
}

.hashtag-form textarea:focus,
.hashtag-form select:focus {
    outline: 2px solid #a995f5;
    outline-offset: 2px;
    border-color: #8c72e8;
}

.hashtag-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0;
}

.hashtag-status {
    min-height: 1.5em;
    color: #5b5275;
    font-size: 0.95rem;
}

.hashtag-note {
    color: #716b80;
    font-size: 0.9rem;
    line-height: 1.5;
}

.tool-card-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: #eee8ff;
    color: #6841c7;
    font-size: 1.7rem;
    font-weight: 700;
}

@media (max-width: 600px) {
    .hashtag-actions {
        flex-direction: column;
    }

    .hashtag-actions .button,
    #hashtag-copy {
        width: 100%;
    }
}

/* ================= PHOTO STUDIO ================= */

.photo-studio {
    background: #ffffff;
    border: 1px solid #e9e3f5;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 28px rgba(71, 48, 112, 0.06);
}

.photo-studio-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee9f6;
}

.photo-studio-layout {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.photo-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.photo-control-group {
    padding: 16px;
    border: 1px solid #eee8f7;
    border-radius: 14px;
    background: #fcfbff;
}

.photo-control-group h3 {
    margin: 0 0 14px;
    color: #33234e;
    font-size: 1rem;
}

.photo-control-group label,
.photo-slider label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #514765;
    font-size: 0.88rem;
}

.photo-control-group input[type="number"],
.photo-control-group input[type="text"],
.photo-control-group select {
    width: 100%;
    min-height: 40px;
    margin-bottom: 12px;
    padding: 9px 11px;
    border: 1px solid #ded5ee;
    border-radius: 9px;
    background: #ffffff;
    color: #33234e;
    font: inherit;
}

.photo-control-group input[type="range"] {
    width: 100%;
    accent-color: #9270d6;
    cursor: pointer;
}

.photo-control-group input[type="color"] {
    width: 100%;
    height: 38px;
    padding: 3px;
    border: 1px solid #ded5ee;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
}

.photo-slider {
    margin-bottom: 16px;
}

.photo-slider:last-child {
    margin-bottom: 0;
}

.photo-slider output,
.photo-control-group output {
    color: #8260c5;
    font-weight: 600;
    white-space: nowrap;
}

.photo-button-grid,
.photo-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.photo-button-grid .btn {
    width: 100%;
    min-width: 0;
    padding: 9px 7px;
    font-size: 0.82rem;
}

.photo-preset {
    padding: 10px 8px;
    border: 1px solid #e2d8f2;
    border-radius: 9px;
    background: #ffffff;
    color: #514765;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease,
        color 0.2s ease, transform 0.2s ease;
}

.photo-preset:hover {
    border-color: #bba5e6;
    transform: translateY(-1px);
}

.photo-preset.active {
    border-color: #9270d6;
    background: #eee7fb;
    color: #583c91;
    font-weight: 600;
}

.photo-editor-main {
    min-width: 0;
}

.photo-canvas-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    color: #756a87;
    font-size: 0.85rem;
}

.photo-canvas-wrap {
    position: relative;
    display: flex;
    min-height: 380px;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 20px;
    border: 1px dashed #d9cdec;
    border-radius: 14px;
    background-color: #f5f2fa;
    background-image:
        linear-gradient(45deg, #ebe6f3 25%, transparent 25%),
        linear-gradient(-45deg, #ebe6f3 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ebe6f3 75%),
        linear-gradient(-45deg, transparent 75%, #ebe6f3 75%);
    background-size: 22px 22px;
    background-position:
        0 0,
        0 11px,
        11px -11px,
        -11px 0;
}

.photo-empty-state {
    max-width: 320px;
    padding: 30px 16px;
    text-align: center;
}

.photo-empty-icon {
    margin-bottom: 12px;
    color: #9270d6;
    font-size: 3rem;
}

.photo-empty-state h3 {
    margin: 0 0 8px;
    color: #33234e;
}

.photo-empty-state p {
    margin: 0 0 18px;
    color: #756a87;
}

#photo-canvas,
#photo-overlay-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 3px;
}

#photo-overlay-canvas {
    position: absolute;
    z-index: 2;
    pointer-events: none;
}

#photo-canvas {
    position: relative;
    z-index: 1;
}

.photo-privacy-note {
    margin-top: 12px;
    line-height: 1.6;
}

#photo-status {
    margin-top: 12px;
}

.photo-control-group .btn-block {
    width: 100%;
}

@media (max-width: 900px) {
    .photo-studio-layout {
        grid-template-columns: 1fr;
    }

    .photo-controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

@media (max-width: 600px) {
    .photo-studio {
        padding: 12px;
    }

    .photo-controls {
        grid-template-columns: 1fr;
    }

    .photo-canvas-wrap {
        min-height: 260px;
        padding: 10px;
    }

    .photo-studio-topbar .btn {
        flex: 1 1 auto;
    }
}

/* =========================================
   EDITOAR VIDEO STUDIO
   White + Lavender
========================================= */

.video-studio {
    --video-lavender: #8b5cf6;
    --video-lavender-dark: #6d28d9;
    --video-lavender-light: #f3efff;
    --video-border: #e8e3f2;
    --video-muted: #777386;

    padding: 24px;
    border: 1px solid var(--video-border);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(60, 40, 100, 0.06);
}

.video-studio h3 {
    margin-top: 0;
    margin-bottom: 14px;
}

.video-toolbar,
.video-action-row,
.video-playback-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.video-toolbar {
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--video-border);
}

.video-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    align-items: start;
    gap: 22px;
}

.video-preview-panel,
.video-timeline-panel {
    min-width: 0;
}

.video-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.video-panel-heading h3 {
    margin: 0;
}

#video-status,
#video-duration {
    color: var(--video-muted);
    font-size: 0.85rem;
}

.video-preview-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 260px;
    overflow: hidden;
    border: 1px solid var(--video-border);
    border-radius: 16px;
    background: #17151e;
    aspect-ratio: 16 / 9;
}

#video-preview {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 560px;
    object-fit: contain;
}

#video-preview:not([src]),
#video-preview[src=""] {
    display: none;
}

#video-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 24px;
    color: #ffffff;
    text-align: center;
}

#video-empty-state .icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    border-radius: 16px;
    background: rgba(167, 139, 250, 0.2);
    color: #c4b5fd;
    font-size: 1.5rem;
}

#video-empty-state h3 {
    margin-bottom: 6px;
}

#video-empty-state p {
    margin: 0;
    color: #d6d1e2;
}

#video-text-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7%;
    overflow-wrap: anywhere;
    color: #ffffff;
    font-size: 42px;
    font-weight: 800;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

.video-playback-controls {
    margin: 16px 0 22px;
}

.video-playback-controls label {
    color: var(--video-muted);
    font-size: 0.85rem;
}

#video-current-time {
    flex: 1 1 120px;
    min-width: 100px;
    accent-color: var(--video-lavender);
}

#video-time-display {
    color: var(--video-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.video-panel {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid var(--video-border);
    border-radius: 16px;
    background: #ffffff;
}

.video-panel > p {
    color: var(--video-muted);
}

.video-two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.video-two-columns .form-group {
    min-width: 0;
}

.video-panel input[type="number"],
.video-panel input[type="text"],
.video-panel textarea,
.video-panel select {
    width: 100%;
    box-sizing: border-box;
}

.video-panel input[type="range"] {
    width: 100%;
    accent-color: var(--video-lavender);
}

.video-studio .btn {
    transition: background 0.18s ease, transform 0.18s ease;
}

.video-studio .btn:hover {
    transform: translateY(-1px);
}

.video-studio .btn:not(.btn-secondary) {
    background: var(--video-lavender);
    border-color: var(--video-lavender);
    color: #ffffff;
}

.video-studio .btn:not(.btn-secondary):hover {
    background: var(--video-lavender-dark);
}

.video-studio .btn-secondary {
    border-color: var(--video-border);
    background: #ffffff;
    color: #494258;
}

.video-studio .btn-secondary:hover {
    background: var(--video-lavender-light);
    border-color: #d7c8ff;
}

.video-timeline-panel {
    padding: 20px;
    border: 1px solid var(--video-border);
    border-radius: 16px;
    background: #fcfbff;
}

.video-timeline-ruler span {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

.video-track {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--video-border);
    border-radius: 12px;
    background: #ffffff;
}

.video-track > strong {
    display: block;
    margin-bottom: 10px;
    color: #494258;
    font-size: 0.85rem;
}

/* One shared horizontal scroll area */
.video-timeline-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Shared width keeps thumbnails and time markings aligned */
.video-timeline-content {
    position: relative;
    width: max(100%, 900px);
}

/* Video thumbnail strip */
.video-track-content {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    min-height: 52px;
    padding: 6px;
    overflow: visible;
    border-radius: 8px;
    background: #f5f3fa;
}

.video-track-content:empty::before {
    content: "Your clips will appear here";
    display: flex;
    align-items: center;
    padding: 8px;
    color: #9992aa;
    font-size: 0.78rem;
    white-space: nowrap;
}

.video-track-content > * {
    flex: 0 0 auto;
}

/* Time markings directly below thumbnails */
.video-timeline-ruler {
    position: relative;
    width: 100%;
    height: 36px;
    margin: 0;
    padding: 10px 0;
    overflow: visible;
    background: var(--video-lavender-light);
    color: var(--video-muted);
    font-size: 0.8rem;
    box-sizing: border-box;
}

.video-timeline-ruler span {
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
}

.video-track-content:empty::before {
    content: "Your clips will appear here";
    display: flex;
    align-items: center;
    padding: 8px;
    color: #9992aa;
    font-size: 0.78rem;
    white-space: nowrap;
}

.video-track-content > * {
    flex: 0 0 auto;
}

.video-studio #video-caption-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.video-studio #video-export-status {
    overflow-wrap: anywhere;
}

.video-studio #video-export {
    margin-top: 6px;
}

/* Responsive layout */

@media (max-width: 900px) {
    .video-editor-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .video-timeline-panel {
        order: 2;
    }
}

@media (max-width: 560px) {
    .video-studio {
        padding: 14px;
        border-radius: 14px;
    }

    .video-toolbar {
        gap: 8px;
    }

    .video-toolbar .btn,
    .video-toolbar label.btn {
        flex: 1 1 auto;
        justify-content: center;
        text-align: center;
    }

    .video-preview-wrap {
        min-height: 190px;
    }

    .video-panel,
    .video-timeline-panel {
        padding: 14px;
    }

    .video-two-columns {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .video-playback-controls {
        align-items: stretch;
    }

    #video-current-time {
        flex-basis: 100%;
        order: 3;
    }

    #video-time-display {
        margin-left: auto;
    }
}

/* =========================================
   EDITOAR VIDEO STUDIO
   ========================================= */

#video-studio {
    padding: 64px 0;
}

#video-studio .video-studio {
    background: #ffffff;
    border: 1px solid #e8e3f5;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 14px 40px rgba(54, 36, 94, 0.08);
}

#video-studio .video-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

#video-studio .video-toolbar .btn,
#video-studio .video-panel .btn,
#video-studio .video-playback-controls .btn {
    min-height: 40px;
}

#video-studio .video-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 22px;
    align-items: start;
}

#video-studio .video-preview-panel,
#video-studio .video-timeline-panel {
    min-width: 0;
}

#video-studio .video-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

#video-studio .video-panel-heading h3 {
    margin: 0;
    color: #29213b;
    font-size: 1.05rem;
}

#video-studio .video-preview-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 260px;
    overflow: hidden;
    border: 1px solid #292432;
    border-radius: 15px;
    background:
        radial-gradient(circle at 50% 45%, #302941 0%, #17141f 70%);
    color: #ffffff;
}

#video-studio #video-preview {
    display: none;
    width: 100%;
    max-height: 520px;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #111015;
}

#video-studio .video-preview-wrap.has-video #video-preview {
    display: block;
}

#video-studio #video-empty-state {
    padding: 30px 20px;
    text-align: center;
    color: #e4dff0;
}

#video-studio #video-empty-state .empty-icon {
    display: block;
    margin-bottom: 12px;
    font-size: 2.5rem;
}

#video-studio #video-text-overlay {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    width: 90%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    pointer-events: none;
    text-shadow:
        0 2px 5px rgba(0, 0, 0, 0.95),
        2px 2px 0 rgba(0, 0, 0, 0.45);
}

#video-studio .video-playback-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 22px;
}

#video-studio #video-current-time {
    flex: 1;
    min-width: 120px;
    accent-color: #8b6be8;
}

#video-studio #video-time-display {
    min-width: 90px;
    color: #5c526e;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

#video-studio .video-panel {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid #ece7f6;
    border-radius: 15px;
    background: #fcfbff;
}

#video-studio .video-panel h3 {
    margin: 0 0 14px;
    color: #302541;
    font-size: 1rem;
}

#video-studio .video-panel p {
    color: #706780;
    font-size: 0.9rem;
    line-height: 1.55;
}

#video-studio .video-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#video-studio .video-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    margin-bottom: 13px;
}

#video-studio .video-field label {
    color: #514561;
    font-size: 0.88rem;
    font-weight: 600;
}

#video-studio .video-field input:not([type="range"]):not([type="color"]):not([type="checkbox"]),
#video-studio .video-field select,
#video-studio .video-field textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #ded6ed;
    border-radius: 10px;
    outline: none;
    background: #ffffff;
    color: #302541;
    font: inherit;
}

#video-studio .video-field textarea {
    min-height: 86px;
    resize: vertical;
}

#video-studio .video-field input:focus,
#video-studio .video-field select:focus,
#video-studio .video-field textarea:focus {
    border-color: #9b7cf0;
    box-shadow: 0 0 0 3px rgba(139, 107, 232, 0.13);
}

#video-studio .video-field input[type="range"] {
    width: 100%;
    accent-color: #8b6be8;
}

#video-studio .video-field input[type="color"] {
    width: 100%;
    height: 42px;
    padding: 4px;
    border: 1px solid #ded6ed;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
}

#video-studio .video-status,
#video-studio #video-status,
#video-studio #video-export-status {
    min-height: 22px;
    margin-top: 10px;
    color: #75698a;
    font-size: 0.88rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

#video-studio .video-timeline-panel {
    padding: 18px;
    border: 1px solid #ece7f6;
    border-radius: 16px;
    background: #faf9fe;
}

#video-studio .video-timeline-ruler {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 16px 0 8px;
    color: #827791;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

#video-studio .video-track {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
}

#video-studio .video-track > strong {
    display: flex;
    align-items: center;
    color: #625572;
    font-size: 0.78rem;
    line-height: 1.35;
}

#video-studio .video-track-content {
    position: relative;
    min-width: 0;
    min-height: 54px;
    overflow: hidden;
    border: 1px solid #e5def1;
    border-radius: 10px;
    background-color: #f0ecf8;
    background-image: linear-gradient(
        to right,
        rgba(111, 87, 157, 0.12) 1px,
        transparent 1px
    );
    background-size: 10% 100%;
}

#video-studio .video-timeline-clip {
    position: absolute;
    top: 5px;
    bottom: 5px;
    display: flex;
    align-items: center;
    min-width: 4px;
    overflow: hidden;
    padding: 0 8px;
    border: 1px solid #8e70e5;
    border-radius: 7px;
    background: linear-gradient(135deg, #a18af1, #8061d5);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#video-studio .video-timeline-clip.caption-clip {
    border-color: #2d9c83;
    background: linear-gradient(135deg, #50c7ad, #218c79);
}

#video-studio .video-timeline-clip.music-clip {
    border-color: #d2a23a;
    background: linear-gradient(135deg, #f1ca6a, #c9972c);
    color: #392b12;
}

#video-studio .video-timeline-playhead {
    position: absolute;
    z-index: 5;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: #f04f72;
    pointer-events: none;
}

#video-studio .video-timeline-playhead::before {
    position: absolute;
    top: 0;
    left: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f04f72;
    content: "";
}

#video-studio .video-caption-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid #e5def1;
    border-radius: 10px;
    background: #ffffff;
    color: #514561;
    font-size: 0.85rem;
}

#video-studio .video-caption-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}

#video-studio .video-caption-item button {
    flex-shrink: 0;
}

#video-studio .video-hint {
    margin: 8px 0 0;
    color: #827791;
    font-size: 0.8rem;
    line-height: 1.5;
}

#video-studio .video-panel .btn:disabled,
#video-studio .video-toolbar .btn:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

@media (max-width: 1000px) {
    #video-studio .video-editor-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    #video-studio .video-timeline-panel {
        order: 2;
    }
}

@media (max-width: 600px) {
    #video-studio {
        padding: 42px 0;
    }

    #video-studio .video-studio {
        padding: 12px;
        border-radius: 16px;
    }

    #video-studio .video-panel {
        padding: 13px;
    }

    #video-studio .video-form-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    #video-studio .video-track {
        grid-template-columns: 66px minmax(0, 1fr);
        gap: 7px;
    }

    #video-studio .video-track > strong {
        font-size: 0.7rem;
    }

    #video-studio .video-preview-wrap {
        min-height: 190px;
    }

    #video-studio #video-text-overlay {
        font-size: 22px;
    }

    #video-studio .video-timeline-panel {
        padding: 12px;
    }

    #video-studio .video-toolbar {
        align-items: stretch;
    }
}

/* =====================================
   EDITOAR VIDEO STUDIO — COMPACT EDITOR
   ===================================== */

#video-studio {
    padding: 24px 0;
}

#video-studio .section-heading {
    margin-bottom: 16px;
}

#video-studio .section-heading > p {
    margin-bottom: 0;
}

#video-studio .video-studio {
    padding: 16px;
    border-radius: 18px;
}

/* Compact top toolbar */
#video-studio .video-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
}

#video-studio .video-toolbar .btn {
    min-height: 36px;
    padding: 8px 12px;
}

/* Preview uses the full available width */
#video-studio .video-editor-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#video-studio .video-preview-panel {
    width: 100%;
    min-width: 0;
}

#video-studio .video-preview-panel > .video-panel-heading {
    margin-bottom: 8px;
}

#video-studio .video-preview-wrap {
    width: 100%;
    min-height: 0;
    height: clamp(240px, 62vh, 650px);
    aspect-ratio: auto;
    border-radius: 12px;
}

#video-studio #video-preview {
    width: 100%;
    height: 100%;
    max-height: 100%;
    aspect-ratio: auto;
    object-fit: contain;
}

/* Compact playback controls */
#video-studio .video-playback-controls {
    gap: 8px;
    margin: 10px 0 12px;
}

/* Tool settings stay compact */
#video-studio .video-panel {
    margin-top: 10px;
    padding: 14px;
}

/* Timeline spans the full width */
#video-studio .video-timeline-panel {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    order: 3;
}

#video-studio .video-track {
    margin-bottom: 8px;
}

#video-studio .video-track-content {
    min-height: 46px;
}

/* Keep the editor usable on smaller screens */
@media (max-width: 700px) {
    #video-studio {
        padding: 16px 0;
    }

    #video-studio .video-studio {
        padding: 10px;
    }

    #video-studio .video-preview-wrap {
        height: clamp(190px, 38vh, 360px);
    }

    #video-studio .video-toolbar {
        gap: 6px;
    }

    #video-studio .video-toolbar .btn {
        flex: 1 1 auto;
        min-width: 0;
        padding: 8px;
        font-size: 0.82rem;
    }

    #video-studio .video-track {
        grid-template-columns: 62px minmax(0, 1fr);
    }
}

/* Video Studio: horizontal editing tools */

#video-studio .video-topbar,
#video-studio .video-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

#video-studio .video-topbar {
    margin-bottom: 12px;
}

#video-studio .video-topbar-actions {
    justify-content: flex-end;
}

#video-studio .video-tool-strip {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    padding: 8px 2px 12px;
    overflow-x: auto;
    border-bottom: 1px solid #e8e3f5;
    scrollbar-width: thin;
}

#video-studio .video-tool-button {
    display: flex;
    flex: 0 0 100px;
    min-height: 76px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    padding: 10px 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #ffffff;
    color: #625572;
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

#video-studio .video-tool-button:hover,
#video-studio .video-tool-button.active {
    border-color: #d9ccff;
    background: #f3efff;
    color: #6d28d9;
}

#video-studio .video-tool-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: #eee7ff;
    color: #6d28d9;
    font-size: 1.2rem;
    font-weight: 700;
}

#video-studio .video-tool-settings {
    min-width: 0;
}

#video-studio .video-tool-panel {
    margin-top: 0;
    margin-bottom: 12px;
}

#video-studio .video-tool-panel[hidden] {
    display: none !important;
}

#video-studio .video-timeline-panel {
    margin-top: 12px;
}

@media (max-width: 600px) {
    #video-studio .video-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    #video-studio .video-topbar-actions {
        justify-content: flex-start;
    }

    #video-studio .video-tool-button {
        flex-basis: 84px;
        min-height: 68px;
        font-size: 0.75rem;
    }
}

/* Video playback controls */
.video-playback-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.video-playback-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.video-position-control {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.video-position-control label,
.video-position-control span {
    flex-shrink: 0;
}

.video-position-control input[type="range"] {
    flex: 1;
    min-width: 60px;
    width: 100%;
}

@media (max-width: 600px) {
    .video-playback-controls {
        flex-wrap: wrap;
        gap: 12px;
    }

    .video-position-control {
        flex-basis: 100%;
    }
}
.video-playback-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.video-playback-controls > #video-play,
.video-playback-controls > #video-stop {
  flex: 0 0 auto;
  white-space: nowrap;
}

.video-tool-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}

.video-tool-strip > * {
  flex: 0 0 auto;
}

.video-tool-strip::-webkit-scrollbar {
  height: 4px;
}

@media (max-width: 480px) {
  .video-playback-controls {
    gap: 5px;
  }

  .video-playback-controls > button {
    padding: 8px;
    font-size: 12px;
  }

  .video-tool-strip {
    gap: 6px;
  }
}

.video-playback-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.video-playback-controls > #video-play,
.video-playback-controls > #video-stop {
  flex: 0 0 auto;
  white-space: nowrap;
}

.video-tool-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 4px 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.video-tool-strip .video-tool-button {
  flex: 0 0 auto;
}

.video-tool-strip::-webkit-scrollbar {
  height: 4px;
}

.video-tool-strip::-webkit-scrollbar-thumb {
  background: #b9a5e8;
  border-radius: 8px;
}

@media (max-width: 480px) {
  .video-playback-controls {
    gap: 5px;
  }

  .video-playback-controls > button {
    padding: 8px;
    font-size: 12px;
  }

  .video-tool-strip {
    gap: 6px;
  }
}
.video-track-content,
.video-timeline-ruler {
    position: relative;
}

.video-track-content {
    min-height: 34px;
    cursor: pointer;
    touch-action: pan-y;
}

.video-timeline-ruler {
    cursor: pointer;
    touch-action: pan-y;
}

.video-timeline-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #7857c5;
    z-index: 5;
    pointer-events: none;
}
.video-thumbnail-clip {
    display: flex;
    overflow: hidden;
    padding: 0;
    gap: 0;
    background: #171322;
}

.video-timeline-thumbnail {
    display: block;
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}
.video-thumbnail-clip {
    color: transparent;
    font-size: 0;
}
/* Replace the purple video strip with actual thumbnails */
.video-thumbnail-clip {
    display: flex !important;
    align-items: stretch;
    overflow: hidden;
    padding: 0 !important;
    gap: 0;
    background: transparent !important;
    color: transparent !important;
    font-size: 0;
    border-radius: 6px;
}

.video-thumbnail-clip .video-timeline-thumbnail {
    display: block;
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    height: 100%;
    object-fit: cover;
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
}
.video-thumbnail-clip {
    display: flex !important;
    overflow: hidden;
    padding: 0 !important;
    gap: 0;
    background: transparent !important;
    border-radius: 6px;
}

.video-thumbnail-clip .video-timeline-thumbnail {
    display: block;
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    height: 100%;
    object-fit: cover;
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
}


.video-current-time {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
    width: 100%;
    padding: 12px 0 16px;
    margin: 0;
    color: #5b3a91;
    font-size: 26px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

.video-current-time #video-current-time {
    color: #5b3a91;
}

.video-current-time #video-total-time {
    color: #9a8aad;
    font-size: 18px;
    font-weight: 500;
}

.video-time-separator {
    color: #c4b5d5;
    font-size: 20px;
    font-weight: 400;
}

.video-current-time {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: baseline;
    white-space: nowrap;
    gap: 8px;
}

.video-current-time #video-current-time,
.video-current-time .video-time-separator,
.video-current-time #video-total-time {
    display: inline;
    white-space: nowrap;
}

.video-timeline-ruler {
    margin-bottom: 2px !important;
    padding-bottom: 0 !important;
}

.video-current-time {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    margin: 2px 0 6px !important;
    padding: 0 !important;
    white-space: nowrap;
}

.video-track {
    margin-top: 0 !important;
}

#video-playback-counter {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px;
    width: 100%;
    margin: 4px 0 8px !important;
    padding: 0 !important;
    white-space: nowrap;
    text-align: center;
    box-sizing: border-box;
}

#video-playback-counter > span {
    display: inline-block;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}
/* Shared ruler and thumbnail timeline */
.video-shared-timeline {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.video-shared-timeline .video-timeline-ruler,
.video-shared-timeline .video-track {
    width: 100%;
    box-sizing: border-box;
}

.video-shared-timeline .video-timeline-ruler {
    margin-bottom: 0;
}

.video-shared-timeline .video-track {
    margin-top: 0;
}
/* =====================================
   VIDEO STUDIO — ONE-SCREEN WORKSPACE
   ===================================== */

@media (min-width: 701px) {
    #video-studio {
        padding: 12px 0;
    }

    #video-studio .section-heading {
        margin-bottom: 10px;
    }

    #video-studio .video-studio {
        padding: 12px;
    }

    #video-studio .video-toolbar {
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    #video-studio .video-editor-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
        gap: 14px;
        align-items: start;
    }

    #video-studio .video-preview-wrap {
        height: clamp(180px, 34vh, 340px);
        min-height: 0;
        aspect-ratio: auto;
    }

    #video-studio #video-preview {
        width: 100%;
        height: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    #video-studio .video-playback-controls {
        margin: 8px 0;
        gap: 6px;
    }

    #video-studio .video-tool-strip {
        margin: 6px 0;
        padding: 4px 0;
    }

    #video-studio .video-tool-button {
        flex-basis: 76px;
        min-height: 58px;
        gap: 4px;
        padding: 6px;
    }

    #video-studio .video-panel {
        margin-top: 6px;
        padding: 10px;
    }

    #video-studio .video-timeline-panel {
        margin-top: 8px;
        padding: 8px;
    }

    #video-studio .video-track {
        margin-bottom: 5px;
    }

    #video-studio .video-track-content {
        min-height: 38px;
    }

    #video-studio .video-timeline-ruler {
        height: 28px;
        padding: 6px 0;
    }
}
/* =====================================
   VIDEO STUDIO — MOBILE WORKSPACE
   ===================================== */

@media (max-width: 700px) {
    #video-studio {
        padding: 10px 0;
    }

    #video-studio .section-heading {
        margin-bottom: 8px;
    }

    #video-studio .video-studio {
        padding: 8px;
        border-radius: 14px;
    }

    #video-studio .video-toolbar {
        gap: 6px;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    #video-studio .video-toolbar .btn {
        min-height: 34px;
        padding: 7px 9px;
        font-size: 0.78rem;
    }

    #video-studio .video-preview-wrap {
        width: 100%;
        height: clamp(150px, 30vh, 260px);
        min-height: 0;
        aspect-ratio: auto;
    }

    #video-studio #video-preview {
        width: 100%;
        height: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    #video-studio .video-panel-heading {
        margin-bottom: 7px;
        gap: 6px;
    }

    #video-studio .video-playback-controls {
        gap: 6px;
        margin: 8px 0;
    }

    #video-studio .video-tool-strip {
        gap: 6px;
        margin: 6px 0;
        padding: 4px 0 8px;
        overflow-x: auto;
    }

    #video-studio .video-tool-button {
        flex: 0 0 70px;
        min-height: 58px;
        padding: 6px;
        font-size: 0.72rem;
    }

    #video-studio .video-tool-icon {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    #video-studio .video-panel {
        margin-top: 6px;
        margin-bottom: 8px;
        padding: 10px;
    }

    #video-studio .video-panel h3 {
        margin-bottom: 8px;
    }

    #video-studio .video-field {
        gap: 5px;
        margin-bottom: 9px;
    }

    #video-studio .video-field textarea {
        min-height: 64px;
    }

    #video-studio .video-timeline-panel {
        margin-top: 6px;
        padding: 8px;
    }

    #video-studio .video-track {
        grid-template-columns: 55px minmax(0, 1fr);
        gap: 6px;
        margin-bottom: 6px;
    }

    #video-studio .video-track-content {
        min-height: 38px;
    }

    #video-studio .video-timeline-scroll {
        overflow-x: auto;
    }

    #video-studio .video-timeline-content {
        min-width: 650px;
    }
}
/* VIDEO STUDIO — RIGHT-SIDE EDITOR LAYOUT */
@media (min-width: 900px) {
  .tool-workspace.video-studio {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }

  .tool-workspace.video-studio > .video-topbar {
    grid-column: 1 / -1;
  }

  .tool-workspace.video-studio > .video-tool-settings {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
  }

  .tool-workspace.video-studio > .video-editor-layout {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
  }

  .video-editor-layout .video-preview-panel,
  .video-editor-layout .video-timeline-panel,
  .video-editor-layout .video-shared-timeline {
    width: 100%;
    min-width: 0;
  }
}

/* VIDEO STUDIO — SMALLER SCREENS */
@media (max-width: 899px) {
  .tool-workspace.video-studio {
    display: flex;
    flex-direction: column;
  }

  .tool-workspace.video-studio > .video-tool-settings,
  .tool-workspace.video-studio > .video-editor-layout {
    width: 100%;
    min-width: 0;
  }

  .video-editor-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
}
/* IMAGE ENHANCER WORKSPACE */

#image-enhancer {
    padding: 60px 20px;
}

.image-enhancer-workspace {
    max-width: 1100px;
    margin: 35px auto 0;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.035);
}

.image-enhancer-upload {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 30px;
}

.image-enhancer-upload .icon {
    font-size: 42px;
}

.image-enhancer-upload h3 {
    margin: 0;
}

.image-enhancer-upload p {
    opacity: 0.7;
    margin: 0 0 10px;
}

.image-enhancer-editor {
    width: 100%;
}

.image-enhancer-preview {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.25);
}

.image-enhancer-preview img {
    display: block;
    max-width: 100%;
    max-height: 550px;
    object-fit: contain;
}
/* TEMPORARILY HIDE UNFINISHED EDITORS */
#photo-studio,
#video-studio {
    display: none !important;
}
/* KEEP MOBILE MENU BUTTON VISIBLE */
@media (max-width: 600px) {
    .navbar {
        position: relative;
    }

    .menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 1001;
        color: #fff !important;
        font-size: 24px !important;
        line-height: 1 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .menu-toggle:focus,
    .menu-toggle:active {
        color: #fff !important;
        opacity: 1 !important;
    }
}
/* Hamburger menu icon */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
}