/* Gradient icon boxes (violet-to-blue) - fallback when Tailwind hasn't scanned utm-builder */
#utm-builder-tool .flex-shrink-0 > div.inline-flex[class*="w-12"][class*="h-12"]:not([class*="emerald"]) {
    background-image: linear-gradient(to bottom right, #7c3aed, #2563eb);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1), 0 0 0 1px rgb(139 92 246 / 0.5);
}

/* ===============================
   Typography (match deep-link-tester / output.css)
   Uses variables from ../../assets/css/variables.css
   =============================== */
body {
    font-family: var(--body-font-family, "Poppins", sans-serif);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font-family, "Satoshi", sans-serif);
}

p, table {
    font-family: var(--text-font-family, "Quicksand", sans-serif);
}

/* ===============================
   URL Validation
   =============================== */
.url-validation {
    font-size: 0.8rem;
    margin-top: 0.35rem;
    min-height: 1.2rem;
    transition: all 0.2s ease;
}

.url-validation.valid {
    color: #22c55e;
}

.url-validation.warning {
    color: #f59e0b;
}

.url-validation.invalid {
    color: #ef4444;
}

/* ===============================
   Source Chips
   =============================== */
.chips-label {
    font-size: 0.8rem;
    color: var(--app-text-secondary);
    margin-bottom: 0.5rem;
    display: block;
}

.source-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.source-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: 2rem;
    background: var(--card-bg-secondary);
    color: var(--app-text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.source-chip:hover {
    border-color: var(--primary-color);
    background: rgba(37, 111, 195, 0.05);
    transform: translateY(-1px);
}

.source-chip.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(37, 111, 195, 0.25);
}

.chip-label {
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===============================
   Medium Tags
   =============================== */
.medium-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.medium-tag {
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    background: var(--card-bg-secondary);
    color: var(--app-text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.medium-tag:hover {
    border-color: var(--primary-color);
    color: var(--app-text-primary);
}

.medium-tag.active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-color: #22c55e;
}

/* ===============================
   Mode Toggle
   =============================== */
.mode-toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.mode-toggle-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mode-label {
    font-size: 0.8rem;
    color: var(--app-text-secondary);
    font-weight: 500;
}

/* Hero CTA - match reference gradient button (no override) */
.hero-cta-btn {
    cursor: pointer;
}

/* Highlight effect when Magic Fill is scrolled into view (soft violet/grey tint, no black) */
.magic-fill-section.magic-highlight {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.35), 0 4px 20px rgba(139, 92, 246, 0.12);
    transition: box-shadow 0.4s ease;
}

/* Magic result URL block */
.magic-generated-url {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--app-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
}

.magic-url-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--app-text-primary);
    margin-bottom: 0.5rem;
}

.magic-url-text {
    font-size: 0.8rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--primary-color);
    word-break: break-all;
    padding: 0.75rem;
    background: var(--app-bg);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.magic-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.magic-copy-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Magic Fill copy button: label visible in dark mode */
html[data-theme="dark"] .utm-builder-page .magic-copy-btn {
    background: #6366f1 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .utm-builder-page .magic-copy-btn:hover {
    background: #4f46e5 !important;
    color: #ffffff !important;
}

/* Screen reader only (Tailwind .sr-only fallback when output.css not loaded) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Toggle track: violet when checked */
.toggle-switch:has(input:checked) {
    background-color: #8b5cf6;
}

/* Toggle thumb: left position by default, right when checked (Tailwind v4 peer-checked fallback).
   Keep thumb visible: use translate that stays inside track (w-11 = 2.75rem, thumb = 1rem). */
.toggle-switch .toggle-slider {
    transform: translateX(0.125rem);
}
/* .toggle-switch input:checked + .toggle-slider {
    transform: translateX(1.25rem);
} */

/* ===============================
   Generated URL Display
   =============================== */
.generated-url-card {
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.generated-url-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--app-text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.url-display {
    background: var(--card-bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 0.75rem;
    padding: 1rem;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    word-break: break-all;
    min-height: 3rem;
    position: relative;
}

.url-placeholder {
    color: var(--app-text-secondary);
    opacity: 0.5;
    font-style: italic;
    font-family: inherit;
}

/* Color-coded parameters */
.url-base {
    color: var(--app-text-primary);
}

.url-separator {
    color: var(--app-text-secondary);
    opacity: 0.5;
}

.param-key {
    opacity: 0.7;
}

.param-val {
    font-weight: 600;
}

.param-source {
    color: #3b82f6;
}

.param-medium {
    color: #22c55e;
}

.param-campaign {
    color: #a855f7;
}

.param-term {
    color: #f59e0b;
}

.param-content {
    color: #ec4899;
}

/* URL meta row */
.url-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.char-count {
    font-size: 0.75rem;
    color: var(--app-text-secondary);
    transition: color 0.2s ease;
}

.char-count.warning {
    color: #f59e0b;
}

.char-count.danger {
    color: #ef4444;
    font-weight: 600;
}

.platform-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.compat-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    white-space: nowrap;
}

.badge-ok {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-warn {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ===============================
   Action Buttons
   =============================== */
.url-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d5ba0 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 111, 195, 0.3);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 0.75rem;
    background: var(--card-bg-primary);
    color: var(--app-text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* ===============================
   Toast Notification
   =============================== */
.copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--app-text-primary);
    color: var(--card-bg-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.copy-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ===============================
   Magic Fill Section
   =============================== */
.magic-fill-section {
    padding: 1.5rem;
    border: 1px solid rgba(168, 85, 247, 0.2);
    background: linear-gradient(135deg, var(--card-bg-primary) 0%, rgba(168, 85, 247, 0.03) 100%);
}

.magic-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.magic-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--app-text-primary);
}

.premium-badge {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.magic-description {
    color: var(--app-text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.magic-fill-btn {
    padding: 0.7rem 1.25rem;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.magic-fill-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.magic-fill-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.magic-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.25rem;
}

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

.magic-result {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    overflow: hidden;
}

.magic-result-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--card-bg-secondary);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
    min-width: 0;
}

.magic-result-item .magic-value {
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.magic-result-item:nth-child(1) {
    animation-delay: 0s;
}

.magic-result-item:nth-child(2) {
    animation-delay: 0.1s;
}

.magic-result-item:nth-child(3) {
    animation-delay: 0.2s;
}

.magic-result-item:nth-child(4) {
    animation-delay: 0.3s;
}

.magic-result-item:nth-child(5) {
    animation-delay: 0.4s;
}

/* Bulk builder: invalid URL rows */
.bulk-url-invalid {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--app-text-primary);
}

.bulk-url-invalid .bulk-invalid-label {
    display: inline-block;
    margin-right: 0.5rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 0.25rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.magic-param {
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: #a855f7;
    font-size: 0.8rem;
    min-width: 110px;
}

.magic-value {
    font-weight: 600;
    color: var(--app-text-primary);
}

/* ===============================
   Bulk Builder Section
   =============================== */
.bulk-section {
    padding: 1.5rem;
}

.bulk-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.bulk-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--app-text-primary);
}

.bulk-gate {
    text-align: center;
    padding: 1.5rem;
    background: var(--card-bg-secondary);
    border-radius: 0.75rem;
}

.bulk-gate p {
    color: var(--app-text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.bulk-gate-row {
    display: flex;
    gap: 0.75rem;
    max-width: 450px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.bulk-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.bulk-results {
    margin-top: 1rem;
}

.bulk-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.bulk-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--card-bg-secondary);
    border-radius: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
}

.bulk-url {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--app-text-primary);
    word-break: break-all;
    flex: 1;
}

.bulk-empty {
    text-align: center;
    color: var(--app-text-secondary);
    padding: 1rem;
    font-size: 0.85rem;
}

.bulk-format-help {
    font-size: 0.75rem;
    color: var(--app-text-secondary);
    margin-bottom: 0.75rem;
}

.bulk-format-help code {
    background: var(--card-bg-secondary);
    padding: 0.1rem 0.3rem;
    border-radius: 0.2rem;
    font-size: 0.7rem;
}

/* Bulk drop zone - reference dashed border, hover */
#bulk-drop-zone.drag-over {
    border-color: #34d399;
    background: #ecfdf5;
}

.bulk-upload-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.bulk-file-name {
    font-size: 0.8rem;
    color: var(--app-text-secondary);
}

.bulk-paste-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--app-text-primary);
}

.bulk-params-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.bulk-param label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--app-text-primary);
}

.magic-actions {
    margin-top: 0.75rem;
}

/* ===============================
   History Section
   =============================== */
.history-section {
    padding: 1.5rem;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.history-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--app-text-primary);
}

.clear-history-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    background: transparent;
    color: var(--app-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-history-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s ease;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:hover {
    background: var(--card-bg-secondary);
}

.history-url {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--app-text-primary);
    word-break: break-all;
    flex: 1;
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.history-time {
    font-size: 0.7rem;
    color: var(--app-text-secondary);
}

.history-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.25rem;
    transition: transform 0.2s ease;
}

.history-copy-btn:hover {
    transform: scale(1.2);
}

.history-empty {
    text-align: center;
    color: var(--app-text-secondary);
    font-size: 0.85rem;
    padding: 1.5rem;
    opacity: 0.7;
}

/* ===============================
   Parameter Guide
   =============================== */
.param-guide {
    padding: 1.5rem;
}

.param-guide-grid {
    display: grid;
    gap: 0.75rem;
}

.param-guide-item {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: var(--card-bg-secondary);
}

@media (max-width: 640px) {
    .param-guide-item {
        grid-template-columns: 1fr;
    }
}

.param-guide-name {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.param-guide-name .param-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-source {
    background: #3b82f6;
}

.dot-medium {
    background: #22c55e;
}

.dot-campaign {
    background: #a855f7;
}

.dot-term {
    background: #f59e0b;
}

.dot-content {
    background: #ec4899;
}

.param-guide-desc {
    font-size: 0.8rem;
    color: var(--app-text-secondary);
    line-height: 1.5;
}

.param-tip {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.7rem;
    color: var(--primary-color);
    opacity: 0.8;
}

/* ===============================
   Benefits Section
   =============================== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 767px) {
    .benefits-grid {
        grid-template-columns: 1fr;
        width: 90%;
        margin: 0 auto;
    }
}

.benefit-card {
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.benefit-card:hover {
    transform: translateY(-2px);
}

.benefit-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.benefit-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--app-text-primary);
    margin-bottom: 0.5rem;
}

.benefit-desc {
    font-size: 0.85rem;
    color: var(--app-text-secondary);
    line-height: 1.5;
}

/* ===============================
   FAQ Section (card style like deep-link-tester)
   =============================== */
.faq-container {
    max-width: 1100px;
}

/* FAQ section title: ensure dark and readable in light mode */
html[data-theme="light"] .faq-heading {
    color: #111827;
}

.faq-item.faq-card .faq-question {
    background: none;
    border: none;
    cursor: pointer;
}

.faq-item .faq-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

/* ===============================
   CTA Section
   =============================== */
.cta-section {
    max-width: 800px;
}

/* ===============================
   Section Title
   =============================== */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--app-text-primary);
}

/* ===============================
   Responsive Adjustments
   =============================== */
@media (max-width: 640px) {
    .magic-gate {
        flex-direction: column;
    }

    .magic-gate .email-input {
        width: 100%;
    }

    .url-actions {
        flex-direction: column;
    }

    .url-actions .copy-btn,
    .url-actions .action-btn {
        width: 100%;
        justify-content: center;
    }

    .generated-url-card {
        padding: 1rem;
    }

    .source-chip {
        padding: 0.35rem 0.6rem;
    }

    .chip-label {
        font-size: 0.7rem;
    }
}

/* ===============================
   Navbar (from output.css / input.css components)
   Required when output.css is not loaded
   =============================== */
@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@media screen and (max-width: 1024px) {
    .navbar #logo-link {
        height: 2.5rem;
    }
    .navbar #logo-link img {
        width: 100px;
    }
    .nav-border {
        color: var(--border-subtle, #e2e8f0);
        margin: 1rem 0 2.5rem;
        border-width: 1px;
    }
    .nav-line {
        background-color: var(--border-subtle, #e2e8f0);
        height: 2rem;
        width: 2px;
    }
    .theme-container {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .theme-container span {
        font-size: 14px;
        font-weight: 450;
    }
    #nav-links {
        justify-content: space-evenly;
        height: 70%;
        font-size: 1.5rem;
    }
    .nav-link {
        font-weight: 500 !important;
    }
}

#navbar-default {
    height: auto;
}
@media screen and (max-width: 768px) {
    #navbar-default {
        height: 100vh;
    }
}

/* Navbar: transparent by default, blur + background on scroll (match deep-link-tester) */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 110;
    width: 100%;
    transition: background-color 0.2s ease, backdrop-filter 0.2s ease, -webkit-backdrop-filter 0.2s ease;
}
.navbar.navbar-scrolled {
    // background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
@media screen and (max-width: 500px) {
    .navbar.navbar-scrolled {
        background-color: rgba(255, 255, 255, 0.9);
    }
}
html[data-theme="dark"] .navbar.navbar-scrolled {
    // background-color: rgba(26, 31, 53, 0.85);
}
@media screen and (max-width: 500px) {
    html[data-theme="dark"] .navbar.navbar-scrolled {
        background-color: rgba(26, 31, 53, 0.9);
    }
}

#nav-links {
    margin-left: auto;
    margin-right: auto;
    font-size: var(--text-sm, 0.875rem);
}

.nav-link,
.navbar .dropdown-item {
    color: var(--text-secondary, #64748b);
    transition: color 0.3s ease;
    font-weight: 500;
}
@media screen and (max-width: 500px) {
    .nav-link,
    .navbar .dropdown-item {
        font-size: 1rem;
    }
}

.navbar .btn-container {
    column-gap: 1rem;
}

.navbar .btn-container button:last-child {
    padding-left: 0.5rem !important;
}

.nav-link:hover,
.active-link,
.active-nav-link {
    color: rgb(var(--info-color, 99 102 241));
}

#toggle-theme {
    color: var(--text-secondary, #64748b);
}

#toggle-theme:hover {
    color: rgb(var(--info-color, 99 102 241));
}

.btn-nav.btn-signup {
    border: 1px solid var(--text-muted, #94a3b8);
    color: var(--text-secondary, #64748b);
    font-weight: 500;
    width: 8rem;
    height: 2.5rem;
    font-size: 14px;
    border-radius: 27px;
}

.btn-nav.btn-signup:hover {
    border-color: rgb(var(--info-color, 99 102 241));
    color: rgb(var(--info-color, 99 102 241));
}

.btn-gradient {
    cursor: pointer;
    width: 8rem;
    height: 2.5rem;
    padding: 3px;
    border-radius: 27px;
    color: white !important;
    background-size: 200% !important;
    background: var(--app-gradient, linear-gradient(to right, #9333ea, #4f46e5));
    animation: gradient-animation 10s linear infinite;
    font-weight: 500;
    font-family: "Poppins", sans-serif;
    border: none;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-gradient:hover {
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
}

.btn-signup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-signup span {
    display: flex;
    background-color: var(--app-bg-primary, #fff);
    padding: 4px;
    border-radius: inherit;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--app-text-primary, #0f172a);
}

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s;
}

.shimmer:hover::before {
    left: 100%;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 0.5rem;
    }
}

/* Nav dropdown (Tools menu) */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown .dropdown,
.nav-dropdown .dropdown-footer {
    position: absolute;
    right: 0;
    background-color: var(--app-bg-primary, #fff);
    border: 1px solid var(--border-subtle, #e2e8f0);
    border-radius: 0.5rem;
    text-align: start;
    font-weight: 400;
}

.nav-dropdown .dropdown-btn,
.nav-dropdown .dropdown-btn-footer {
    gap: 0.5rem;
    display: flex;
    align-items: center;
}

.nav-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    display: block;
}

.nav-dropdown .dropdown-item:hover {
    background-color: var(--border-subtle, #e2e8f0);
}

/* ===============================
   Footer (from output.css / Tailwind equivalents)
   Required when output.css is not loaded
   =============================== */
/* Footer container: same width as navbar and main content (override Tailwind .container) */
footer.container {
    max-width: var(--responsive-width, 1400px);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 2rem;
    box-sizing: border-box;
}

footer .mt-10 {
    margin-top: 2.5rem;
}

/* Main footer row: column-reverse on mobile, row on lg; space between */
footer .flex.items-center.flex-col-reverse.lg\:flex-row.justify-between,
footer .flex.items-center.justify-between.text-center.gap-y-6 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    gap: 1.5rem;
    padding-bottom: 0;
}
@media (min-width: 1024px) {
    footer .flex.items-center.flex-col-reverse.lg\:flex-row.justify-between,
    footer .flex.items-center.justify-between.text-center.gap-y-6 {
        flex-direction: row;
    }
}
@media (max-width: 1023px) {
    footer .flex.items-center.flex-col-reverse.lg\:flex-row.justify-between {
        flex-direction: column-reverse;
    }
    footer .flex.items-center.justify-between.text-center.gap-y-6 {
        flex-direction: column-reverse;
    }
}
@media (min-width: 640px) {
    footer .flex.items-center.justify-between.text-center.gap-y-6 {
        padding-bottom: 2rem;
    }
}

/* Copyright + social block */
footer .flex.items-center.gap-4.flex-col-reverse.lg\:flex-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}
@media (max-width: 1023px) {
    footer .flex.items-center.gap-4.flex-col-reverse.lg\:flex-row {
        flex-direction: column-reverse;
    }
}
@media (min-width: 1024px) {
    footer .flex.items-center.gap-4.flex-col-reverse.lg\:flex-row {
        flex-direction: row;
    }
}

footer .text-sm.font-light.md\:text-start.text-center {
    font-size: 0.875rem;
    font-weight: 300;
    text-align: center;
}
@media (min-width: 768px) {
    footer .text-sm.font-light.md\:text-start.text-center {
        text-align: start;
    }
}

footer .flex.items-center.gap-6 {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Footer nav list */
footer .flex.flex-col.sm\:flex-row.gap-4.sm\:gap-10.font-light.items-center {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-weight: 300;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}
@media (min-width: 640px) {
    footer .flex.flex-col.sm\:flex-row.gap-4.sm\:gap-10.font-light.items-center {
        flex-direction: row;
        gap: 2.5rem;
    }
}

footer .flex.flex-col.sm\:flex-row.gap-4.sm\:gap-10.font-light.items-center a {
    font-size: 0.875rem;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
}
footer .flex.flex-col.sm\:flex-row.gap-4.sm\:gap-10.font-light.items-center a:hover {
    color: var(--app-text-primary, #0f172a);
}

/* Footer pipe separators: Tailwind v4 "block max-sm:hidden" = visible from sm (40rem) up */
footer ul li.block.max-sm\:hidden {
    display: none;
}
@media (width >= 40rem) {
    footer ul li.block.max-sm\:hidden {
        display: block;
    }
}

/* Footer Tools dropdown (opens upward) */
footer .nav-dropdown {
    position: relative;
}

footer .nav-dropdown .dropdown-footer,
footer .nav-dropdown .footer-dropdown-menu {
    position: absolute;
    right: 0;
    bottom: 100%;
    top: auto;
    margin-bottom: 0.25rem;
    width: 11rem;
    min-width: 11rem;
    background-color: var(--app-bg-primary, #fff);
    border: 1px solid var(--border-subtle, #e2e8f0);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg, 0 8px 25px rgba(0, 0, 0, 0.12));
    text-align: start;
    font-weight: 400;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

footer .nav-dropdown:hover .dropdown-footer,
footer .nav-dropdown:hover .footer-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

footer .nav-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    display: block;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
    font-size: 0.875rem;
}

footer .nav-dropdown .dropdown-item:hover {
    background-color: var(--border-subtle, #e2e8f0);
    color: var(--app-text-primary, #0f172a);
}

/* ===============================
   Dark mode card overrides only
   =============================== */
html[data-theme="dark"] .builder-main-card {
    background: var(--card-bg-primary);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
}

html[data-theme="dark"] .generated-url-card {
    background: var(--card-bg-primary);
    border-color: var(--border-subtle);
}

html[data-theme="dark"] .quick-tips-card {
    background: transparent !important;
    border: 1px solid var(--border-subtle);
}

html[data-theme="dark"] .quick-tips-card h4,
html[data-theme="dark"] .quick-tips-card .text-slate-900 {
    color: var(--app-text-primary);
}

html[data-theme="dark"] .quick-tips-card ul,
html[data-theme="dark"] .quick-tips-card .text-slate-600 {
    color: var(--app-text-secondary);
}

html[data-theme="dark"] .magic-fill-section {
    background: var(--card-bg-primary);
    border-color: var(--border-subtle);
    box-shadow: none;
}

html[data-theme="dark"] .magic-fill-section.magic-highlight {
    box-shadow: none;
}

html[data-theme="dark"] .history-section {
    background: var(--card-bg-primary);
    border: 1px solid var(--border-subtle);
    box-shadow: none;
}

html[data-theme="dark"] .param-guide-card {
    background: var(--card-bg-primary);
    border-color: var(--border-subtle);
}

html[data-theme="dark"] .benefit-section-card {
    background: var(--card-bg-primary);
    border-color: var(--border-subtle);
}

[data-theme="dark"] .faq-card,
[data-theme="dark"] .cta-section .card {
    border-color: var(--border-subtle);
}

/* Dark mode: remove box shadow from gradient buttons */
html[data-theme="dark"] .main-layout .btn-gradient,
html[data-theme="dark"] .main-layout .magic-fill-btn,
html[data-theme="dark"] .main-layout .hero-cta-btn,
html[data-theme="dark"] .main-layout #copy-url-btn,
html[data-theme="dark"] .main-layout #bulk-generate-btn,
html[data-theme="dark"] .main-layout button[class*="bg-gradient-to-r"],
html[data-theme="dark"] .main-layout button[class*="bg-gradient-to-br"] {
    box-shadow: none;
}

html[data-theme="dark"] .main-layout .magic-fill-btn:hover {
    box-shadow: none;
}

/* Bulk section dark mode */
html[data-theme="dark"] .bulk-section {
    background: var(--card-bg-primary);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
}

html[data-theme="dark"] .bulk-section #bulk-drop-zone {
    background: var(--card-bg-secondary);
    border-color: var(--border-subtle);
}

html[data-theme="dark"] .bulk-section #bulk-drop-zone .bg-white {
    background: var(--card-bg-primary) !important;
    border: 1px solid var(--border-subtle);
}

html[data-theme="dark"] .bulk-section h3,
html[data-theme="dark"] .bulk-section h4,
html[data-theme="dark"] .bulk-section label,
html[data-theme="dark"] .bulk-section #bulk-upload-text,
html[data-theme="dark"] .bulk-section #bulk-upload-subtext {
    color: var(--app-text-primary);
}

html[data-theme="dark"] .bulk-section p.text-slate-600,
html[data-theme="dark"] .bulk-section .text-slate-500 {
    color: var(--app-text-secondary);
}

html[data-theme="dark"] .bulk-section .text-slate-500.bg-white {
    background: var(--card-bg-primary) !important;
    color: var(--app-text-secondary);
}

html[data-theme="dark"] .bulk-section .bulk-params-panel,
html[data-theme="dark"] .bulk-section .bulk-params-panel.bg-slate-50 {
    background: transparent;
    border: 1px solid var(--border-subtle);
}

html[data-theme="dark"] .bulk-section .bulk-textarea,
html[data-theme="dark"] .bulk-section .bulk-params-panel .utm-input {
    background: transparent;
    border-color: var(--border-subtle);
    color: var(--app-text-primary);
}

html[data-theme="dark"] .bulk-section .border-slate-200 {
    border-color: var(--border-subtle);
}

html[data-theme="dark"] .bulk-section #bulk-copy-all-btn.bg-white,
html[data-theme="dark"] .bulk-section button.bg-white {
    background: var(--card-bg-primary) !important;
    border-color: var(--border-subtle);
    color: var(--app-text-primary);
}

/* ===============================
   Dark mode – readable text (entire UTM builder page)
   =============================== */
html[data-theme="dark"] .main-layout .text-slate-900 {
    color: var(--app-text-primary);
}

html[data-theme="dark"] .main-layout .text-slate-700 {
    color: var(--app-text-primary);
}

html[data-theme="dark"] .main-layout .text-slate-600 {
    color: var(--app-text-secondary);
}

html[data-theme="dark"] .main-layout .text-slate-500 {
    color: var(--app-text-secondary);
}

html[data-theme="dark"] .main-layout .text-gray-500 {
    color: var(--app-text-secondary);
}

/* Hero */
html[data-theme="dark"] .main-layout .hero-section .text-slate-900 {
    color: var(--app-text-primary);
}

html[data-theme="dark"] .main-layout .hero-section .text-slate-600 {
    color: var(--app-text-secondary);
}

/* Form labels and hints */
html[data-theme="dark"] .main-layout .field-label,
html[data-theme="dark"] .main-layout label.text-slate-900 {
    color: var(--app-text-primary);
}

/* Inputs and textareas */
html[data-theme="dark"] .main-layout .utm-input,
html[data-theme="dark"] .main-layout .utm-input.text-slate-900 {
    background: transparent;
    border-color: var(--border-subtle);
    color: var(--app-text-primary);
}

html[data-theme="dark"] .main-layout .utm-input::placeholder {
    color: var(--text-secondary);
}

/* Generated URL display box */
html[data-theme="dark"] .main-layout .url-display,
html[data-theme="dark"] .main-layout #generated-url-display,
html[data-theme="dark"] .main-layout .url-display.bg-white {
    background: var(--app-bg) !important;
    border-color: var(--border-subtle);
    color: var(--app-text-primary);
}

html[data-theme="dark"] .main-layout .url-placeholder {
    color: var(--app-text-secondary);
}

html[data-theme="dark"] .main-layout .char-count {
    color: var(--app-text-secondary);
}

/* Action buttons (Test Link, Social Preview, Shorten, Reset) */
html[data-theme="dark"] .main-layout .action-btn,
html[data-theme="dark"] .main-layout .reset-fields-btn {
    background: var(--card-bg-primary) !important;
    border-color: var(--border-subtle);
    color: var(--app-text-primary);
}

/* Magic Fill textarea and examples */
html[data-theme="dark"] .main-layout .magic-prompt-textarea {
    background: transparent !important;
    border-color: var(--border-subtle);
    color: var(--app-text-primary);
}

html[data-theme="dark"] .main-layout .magic-prompt-textarea::placeholder {
    color: var(--text-secondary);
}

/* All inputs and textareas in UTM builder – transparent in dark mode */
html[data-theme="dark"] .main-layout input[type="text"],
html[data-theme="dark"] .main-layout input[type="url"],
html[data-theme="dark"] .main-layout input[type="email"],
html[data-theme="dark"] .main-layout textarea {
    background: transparent !important;
}

/* Param guide section */
html[data-theme="dark"] .main-layout #param-guide .text-slate-900 {
    color: var(--app-text-primary);
}

html[data-theme="dark"] .main-layout #param-guide .text-slate-600,
html[data-theme="dark"] .main-layout #param-guide .text-slate-500 {
    color: var(--app-text-secondary);
}

html[data-theme="dark"] .main-layout #param-guide div.bg-gradient-to-r {
    background: var(--card-bg-secondary) !important;
    border-color: var(--border-subtle);
}

html[data-theme="dark"] .main-layout #param-guide div.bg-gradient-to-r .bg-white {
    background: var(--card-bg-primary) !important;
}

/* Benefits section */
html[data-theme="dark"] .main-layout #benefits .text-slate-900 {
    color: var(--app-text-primary);
}

html[data-theme="dark"] .main-layout #benefits .text-slate-600 {
    color: var(--app-text-secondary);
}

/* Bulk results list: generated URLs readable in dark mode */
html[data-theme="dark"] .main-layout #bulk-preview {
    background: var(--card-bg-secondary);
    border-color: var(--border-subtle);
}

html[data-theme="dark"] .main-layout #bulk-preview h4,
html[data-theme="dark"] .main-layout #bulk-preview #bulk-count {
    color: var(--app-text-primary) !important;
}

html[data-theme="dark"] .main-layout #bulk-preview .bg-white.rounded-lg {
    background: var(--card-bg-secondary) !important;
    border-color: var(--border-subtle);
}

html[data-theme="dark"] .main-layout #bulk-urls-list,
html[data-theme="dark"] .main-layout #bulk-urls-list.text-slate-900,
html[data-theme="dark"] .main-layout #bulk-urls-list > div {
    color: var(--app-text-primary);
}

html[data-theme="dark"] .main-layout #bulk-urls-list > div.bg-slate-50 {
    background: var(--card-bg-primary) !important;
    border-color: var(--border-subtle);
    color: var(--app-text-primary);
}

html[data-theme="dark"] .main-layout #bulk-clear-btn {
    color: var(--app-text-secondary) !important;
}

html[data-theme="dark"] .main-layout #bulk-clear-btn:hover {
    color: var(--app-text-primary) !important;
}

/* Violet badge text (e.g. URL Builder, AI-Powered) – keep readable */
html[data-theme="dark"] .main-layout .bg-violet-100.text-violet-700 {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #c4b5fd;
}

html[data-theme="dark"] .main-layout .bg-emerald-100.text-emerald-700 {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #6ee7b7;
}


.shorten-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: white !important;
  border-color: #f59e0b !important;
}

.shorten-btn:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  color: white;
  border-color: #f59e0b;
}

/* Shorten button: same amber in light and dark */
html[data-theme="dark"] .utm-builder-page .shorten-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  border-color: #f59e0b !important;
}

html[data-theme="dark"] .utm-builder-page .shorten-btn:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  color: #ffffff !important;
}
