/* ==========================================================================
   GuinRank V7 - YouTube Community Polls & Quiz Generator (polls-generator.css)
   Zero-Regression Engineering Standards:
   - 100% Pure CSS Theme Variables (:root)
   - Certified across Dark, Light, Sunmoon, and Monochrome Themes
   - Root-Level Viewport Escaping Modal & Dual Scroll Lock
   - Wide-Mode Layout Expansion
   ========================================================================== */

/* Dual Scroll Lock for Modals */
html.modal-open, body.modal-open {
    overflow: hidden !important;
    height: 100vh !important;
}

/* 1. Root Container & Scoping */
.polls-generator-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 24px 20px 80px 20px;
    box-sizing: border-box;
    color: var(--text-main);
}

.polls-generator-container.rtl {
    direction: rtl;
    text-align: right;
}

.polls-generator-container.ltr {
    direction: ltr;
    text-align: left;
}

/* Wide Mode Support */
.polls-generator-container.is-wide-mode .tool-main-container {
    max-width: 100% !important;
    width: 100% !important;
}

.tool-main-container {
    max-width: 1240px;
    margin: 0 auto;
    position: relative;
    transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. Loading State */
.tool-loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.tool-content-state {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.tool-content-state.show {
    opacity: 1;
    display: block !important;
}

.none {
    display: none;
}

/* Floating Expand Action */
.fixed-floating-actions {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 1000;
}

.rtl .fixed-floating-actions {
    right: auto;
    left: 24px;
}

.floating-expand-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.floating-expand-btn:hover {
    transform: scale(1.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 8%, var(--card-bg));
}

/* 1. Compliance Micro-Bar */
.compliance-micro-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.compliance-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
    border-radius: 9999px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.compliance-pill:hover {
    border-color: var(--primary-color);
    color: var(--text-main);
    transform: translateY(-1px);
}

.compliance-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px color-mix(in srgb, var(--success) 60%, transparent);
}

.compliance-shield-icon {
    width: 15px;
    height: 15px;
    color: var(--success);
}

.compliance-info-icon {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

/* 2. Console Hero Header */
.console-hero-header {
    text-align: center;
    max-width: 860px;
    margin: 0 auto 36px auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
}

.hero-badge-icon {
    width: 14px;
    height: 14px;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    color: var(--text-main);
}

.gradient-text {
    font-style: normal;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover, var(--primary-color)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 auto;
}

/* 3. Features Belt */
.features-belt-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

@media (max-width: 992px) {
    .features-belt-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .features-belt-grid {
        grid-template-columns: 1fr;
    }
}

.feature-belt-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-belt-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.feature-belt-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.feature-belt-icon-box svg {
    width: 20px;
    height: 20px;
}

.feature-belt-content {
    flex: 1;
}

.feature-belt-title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--text-main);
}

.feature-belt-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
}

/* 4. Unified Command Hub */
.command-hub-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 100;
}

.command-hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.hub-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hub-icon {
    width: 22px;
    height: 22px;
    color: var(--primary-color);
}

.hub-title {
    font-size: 1.1875rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.cost-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: color-mix(in srgb, var(--warning) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent);
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--warning);
}

.cost-badge svg {
    width: 14px;
    height: 14px;
}

/* Channel Context Ingestion Tier */
.channel-ingestion-tier {
    margin-bottom: 20px;
}

.custom-channel-dropdown {
    position: relative;
    margin-top: 6px;
}

.channel-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: color-mix(in srgb, var(--card-bg) 60%, var(--bg-body));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.channel-dropdown-trigger:hover {
    border-color: var(--primary-color);
}

.channel-avatar-tiny {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.channel-title-text {
    flex: 1;
    text-align: left;
    font-weight: 600;
}

.rtl .channel-title-text {
    text-align: right;
}

.dropdown-arrow-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.channel-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 220px;
    overflow-y: auto;
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    color: var(--text-main);
}

.channel-item:hover {
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: var(--primary-color);
}

/* Inputs & Form Elements */
.input-group-row {
    margin-bottom: 20px;
}

.field-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.required-indicator {
    color: var(--danger);
    margin-left: 4px;
}

.input-with-button {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-box {
    position: absolute;
    left: 14px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.rtl .input-icon-box {
    left: auto;
    right: 14px;
}

.clear-input-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.rtl .clear-input-btn {
    right: auto;
    left: 12px;
}

.clear-input-btn:hover {
    color: var(--text-main);
    background: color-mix(in srgb, var(--text-main) 10%, transparent);
}

.custom-field-input {
    width: 100%;
    padding: 12px 14px 12px 46px;
    background: color-mix(in srgb, var(--card-bg) 60%, var(--bg-body));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9375rem;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.rtl .custom-field-input {
    padding: 12px 46px 12px 14px;
}

.custom-field-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent);
}

.filters-dual-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .filters-dual-row {
        grid-template-columns: 1fr;
    }
}

/* Custom Dropdown Component */
.custom-dropdown-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    background: color-mix(in srgb, var(--card-bg) 60%, var(--bg-body));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.custom-dropdown-trigger:hover,
.custom-dropdown-wrapper.is-open .custom-dropdown-trigger {
    border-color: var(--primary-color);
}

.dropdown-trigger-icon {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    margin-right: 8px;
}

.rtl .dropdown-trigger-icon {
    margin-right: 0;
    margin-left: 8px;
}

.dropdown-trigger-name {
    flex: 1;
    text-align: left;
}

.rtl .dropdown-trigger-name {
    text-align: right;
}

.dropdown-trigger-chevron {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.custom-dropdown-wrapper.is-open .dropdown-trigger-chevron {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
    max-height: 280px;
    overflow-y: auto;
    animation: pollsDropdownFade 0.2s ease;
}

@keyframes pollsDropdownFade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-header-strip {
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: color-mix(in srgb, var(--card-bg) 40%, var(--bg-body));
    border-bottom: 1px solid var(--border-color);
}

.custom-dropdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.custom-dropdown-row:hover {
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: var(--primary-color);
}

.custom-dropdown-row.is-active {
    background: color-mix(in srgb, var(--primary-color) 15%, transparent);
    color: var(--primary-color);
}

.dropdown-row-check {
    display: flex;
    align-items: center;
    color: var(--primary-color);
}

.hub-action-row {
    display: flex;
    justify-content: flex-end;
}

.btn-primary-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--primary-color);
    color: var(--text-main);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.btn-primary-action:hover:not(:disabled) {
    transform: translateY(-2px);
    background: var(--primary-hover, var(--primary-color));
    box-shadow: var(--shadow-lg);
}

.btn-primary-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 5. Bento Features Cluster */
.console-features {
    margin-bottom: 44px;
    position: relative;
    z-index: 1;
}

.bento-features-cluster {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.bc-wide-top {
    grid-column: span 2;
}

.bc-tall {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bc-wide-mid {
    grid-column: span 2;
}

.bento-decor-icon {
    position: absolute;
    top: 14px;
    inset-inline-end: 16px;
    opacity: 0.12;
    color: var(--primary-color);
    font-size: 28px;
}

.dashed-ring-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.bc-icon-wrapper svg {
    width: 22px;
    height: 22px;
}

.bc-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.bc-desc {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 992px) {
    .bento-features-cluster {
        grid-template-columns: repeat(2, 1fr);
    }
    .bc-wide-top, .bc-wide-mid {
        grid-column: span 2;
    }
    .bc-tall {
        grid-row: auto;
    }
}

@media (max-width: 640px) {
    .bento-features-cluster {
        grid-template-columns: 1fr;
    }
    .bc-wide-top, .bc-wide-mid {
        grid-column: span 1;
    }
    .bc-tall {
        grid-row: auto;
    }
}

/* 6. Dynamic Results Workspace */
.results-workspace-section {
    margin-top: 36px;
    margin-bottom: 60px;
}

.workspace-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow-lg);
}

.workspace-header {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.workspace-meta-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.video-thumb-container {
    position: relative;
    width: 96px;
    height: 54px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
}

.video-thumb-mini {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-thumb-badge {
    position: absolute;
    bottom: 4px;
    inset-inline-end: 4px;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--card-bg) 50%, black);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumb-badge svg {
    width: 11px;
    height: 11px;
}

.meta-icon-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.meta-icon-placeholder svg {
    width: 24px;
    height: 24px;
}

.video-main-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.channel-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 4px;
    flex-wrap: wrap;
}

.channel-name {
    font-weight: 600;
    color: var(--text-main);
}

.niche-badge, .polls-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.niche-badge {
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
}

.polls-count-badge {
    background: color-mix(in srgb, var(--success) 12%, transparent);
    color: var(--success);
}

/* Poll Tabs Bar */
.poll-tabs-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 24px;
}

.poll-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: color-mix(in srgb, var(--card-bg) 60%, var(--bg-body));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.poll-tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 8%, var(--card-bg));
}

.poll-tab-btn.active-tab {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-main);
}

.poll-tab-btn svg {
    width: 16px;
    height: 16px;
}

/* Simulator Container */
.community-simulator-container {
    margin-bottom: 32px;
}

.simulator-mode-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.sim-feed-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-muted);
}

.sim-feed-tag svg {
    width: 15px;
    height: 15px;
    color: var(--primary-color);
}

.sim-theme-toggle {
    display: inline-flex;
    align-items: center;
    background: color-mix(in srgb, var(--card-bg) 60%, var(--bg-body));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.sim-theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sim-theme-btn svg {
    width: 13px;
    height: 13px;
}

.sim-theme-btn.active-mode {
    background: var(--card-bg);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Authentic Community Post Simulator Card */
.simulator-card {
    background: color-mix(in srgb, var(--card-bg) 40%, var(--bg-body));
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    max-width: 680px;
    margin: 0 auto;
}

.sim-post-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
}

.author-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-main);
}

.author-badge {
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.author-badge svg {
    width: 14px;
    height: 14px;
}

.post-time-ago {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sim-post-content {
    margin-bottom: 16px;
}

.post-text {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--text-main);
    margin: 0;
    white-space: pre-line;
}

/* Video Attachment Preview */
.sim-video-attachment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 16px;
}

.sim-attachment-thumb-wrap {
    position: relative;
    width: 90px;
    height: 52px;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-body);
}

.sim-attachment-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sim-attachment-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-main);
}

.sim-attachment-play svg {
    width: 16px;
    height: 16px;
}

.sim-attachment-info {
    flex: 1;
    min-width: 0;
}

.sim-attachment-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sim-attachment-channel {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Poll Box */
.sim-poll-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}

.poll-type-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.quiz-pill, .poll-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.quiz-pill {
    background: color-mix(in srgb, var(--purple) 15%, transparent);
    color: var(--purple);
}

.poll-pill {
    background: color-mix(in srgb, var(--primary-color) 15%, transparent);
    color: var(--primary-color);
}

.quiz-pill svg, .poll-pill svg {
    width: 13px;
    height: 13px;
}

.char-count-pill {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--card-bg) 60%, var(--bg-body));
    border: 1px solid var(--border-color);
}

.char-count-pill.char-safe {
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 30%, transparent);
}

.poll-question-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 16px 0;
    line-height: 1.4;
}

/* Options List */
.sim-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.sim-option-item {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: color-mix(in srgb, var(--card-bg) 50%, var(--bg-body));
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
}

.sim-option-item:hover {
    border-color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 6%, var(--card-bg));
}

.option-progress-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    background: color-mix(in srgb, var(--primary-color) 18%, transparent);
    transition: width 0.4s ease-out;
    z-index: 1;
}

.rtl .option-progress-bar {
    left: auto;
    right: 0;
}

.sim-option-item.quiz-correct .option-progress-bar {
    background: color-mix(in srgb, var(--success) 22%, transparent);
}

.sim-option-item.quiz-wrong .option-progress-bar {
    background: color-mix(in srgb, var(--danger) 22%, transparent);
}

.sim-option-item.quiz-correct {
    border-color: var(--success);
}

.sim-option-item.quiz-wrong {
    border-color: var(--danger);
}

.option-inner-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
}

.option-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.option-radio-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sim-option-item:hover .option-radio-dot {
    border-color: var(--primary-color);
}

.active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
}

.correct-mark {
    color: var(--success);
    display: flex;
    align-items: center;
}

.correct-mark svg {
    width: 14px;
    height: 14px;
}

.wrong-mark {
    color: var(--danger);
    display: flex;
    align-items: center;
}

.wrong-mark svg {
    width: 14px;
    height: 14px;
}

.option-text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-main);
}

.option-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-percent {
    font-family: monospace;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
}

.char-len-badge {
    font-family: monospace;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Quiz Explanation Box */
.quiz-explanation-box {
    margin-top: 14px;
    padding: 12px 16px;
    background: color-mix(in srgb, var(--purple) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--purple) 25%, transparent);
    border-radius: 10px;
}

.explanation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--purple);
    margin-bottom: 6px;
}

.explanation-header svg {
    width: 16px;
    height: 16px;
}

.explanation-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-main);
    margin: 0;
}

.sim-poll-footer {
    margin-top: 10px;
    text-align: center;
}

.cta-note {
    font-size: 0.8125rem;
    font-style: italic;
    color: var(--text-muted);
}

/* Actions Toolbar */
.sim-actions-toolbar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.copy-btns-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 576px) {
    .copy-btns-group {
        grid-template-columns: 1fr;
    }
}

.btn-copy-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-full {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.btn-copy-full:hover {
    background: var(--primary-hover, var(--primary-color));
    border-color: var(--primary-hover, var(--primary-color));
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.btn-copy-options {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-copy-options:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 8%, var(--card-bg));
    transform: translateY(-1px);
}

.btn-copy-tool svg {
    width: 16px;
    height: 16px;
}

.strategy-callout-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: color-mix(in srgb, var(--warning) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent);
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--warning);
}

.strategy-callout-pill svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Pro Takeaways Card */
.pro-takeaways-card {
    background: color-mix(in srgb, var(--primary-color) 6%, var(--card-bg));
    border: 1px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
    border-radius: 14px;
    padding: 20px 24px;
    margin-top: 36px;
}

.takeaways-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.takeaways-header svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.takeaways-header h4 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-main);
}

.takeaways-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.takeaways-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text-main);
    line-height: 1.45;
}

.bullet-check svg {
    width: 16px;
    height: 16px;
    color: var(--success);
    margin-top: 2px;
}

/* 7. Modal System (Viewport Escaping Root-Level) */
.custom-modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    margin: 0 !important;
    padding: 20px !important;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(12px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.custom-modal-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-header-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--success) 15%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    flex-shrink: 0;
}

.modal-header-icon-box svg {
    width: 22px;
    height: 22px;
}

.modal-header-text {
    flex: 1;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 2px 0;
    color: var(--text-main);
}

.modal-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    color: var(--text-main);
    background: color-mix(in srgb, var(--text-main) 10%, transparent);
}

.modal-card-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(85vh - 140px);
}

.spec-callout-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
    border-radius: 10px;
    margin-bottom: 20px;
}

.spec-callout-banner svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.spec-callout-banner p {
    font-size: 0.875rem;
    color: var(--text-main);
    margin: 0;
    line-height: 1.45;
}

.legal-articles-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.legal-article-item {
    background: color-mix(in srgb, var(--card-bg) 60%, var(--bg-body));
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.legal-article-item h4 {
    margin: 0 0 6px 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--primary-color);
}

.legal-article-item p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.modal-card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.btn-modal-dismiss {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-dismiss:hover {
    background: color-mix(in srgb, var(--primary-color) 10%, var(--card-bg));
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==========================================================================
   GuinRank V7 - Universal Quick Benchmark & Sample Chips Design System
   100% Pure Theme Variables (:root) - Certified across All 4 Themes
   ========================================================================== */
.quick-chips-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 22px;
}

.quick-chips-strip.col-span-2 {
    grid-column: 1 / -1;
}

.chips-label,
.quick-chip-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-inline-end: 4px;
    user-select: none;
}

.quick-chip-btn,
.quick-chip,
.channel-chip-btn,
.chip-btn,
.chapter-chip-btn,
.competitor-chip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    background: color-mix(in srgb, var(--card-bg) 70%, var(--bg-body));
    border: 1px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-decoration: none;
    user-select: none;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--border-color) 20%, transparent);
}

.quick-chip-btn:hover,
.quick-chip:hover,
.channel-chip-btn:hover,
.chip-btn:hover,
.chapter-chip-btn:hover,
.competitor-chip-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, var(--card-bg));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color) 18%, transparent);
}

.quick-chip-btn:active,
.quick-chip:active,
.channel-chip-btn:active,
.chip-btn:active,
.chapter-chip-btn:active,
.competitor-chip-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px color-mix(in srgb, var(--primary-color) 12%, transparent);
}

.quick-chip-btn:focus-visible,
.quick-chip:focus-visible,
.channel-chip-btn:focus-visible,
.chip-btn:focus-visible,
.chapter-chip-btn:focus-visible,
.competitor-chip-btn:focus-visible {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 25%, transparent);
}

