/* ===== CSS Variables & Reset ===== */
:root {
    --bg-primary: #FDF6EC;
    --bg-secondary: #FFF9F0;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FFF5E6;
    --bg-elevated: #F5EDE0;
    --border: rgba(120, 80, 40, 0.10);
    --border-hover: rgba(120, 80, 40, 0.20);
    --text-primary: #2D1B0E;
    --text-secondary: #6B5744;
    --text-muted: #9C8B78;
    --accent-purple: #7B2D5F;
    --accent-purple-light: #A0406E;
    --accent-blue: #7B2D5F;
    --accent-green: #2D8B55;
    --accent-yellow: #E8740C;
    --accent-red: #C93535;
    --accent-pink: #A0406E;
    --gradient-primary: linear-gradient(135deg, #7B2D5F, #E8740C);
    --gradient-warm: linear-gradient(135deg, #E8740C, #C93535);
    --gradient-cool: linear-gradient(135deg, #2D8B55, #E8740C);
    --shadow-sm: 0 2px 8px rgba(120, 80, 40, 0.08);
    --shadow-md: 0 4px 16px rgba(120, 80, 40, 0.12);
    --shadow-lg: 0 8px 32px rgba(120, 80, 40, 0.16);
    --shadow-glow: 0 0 20px rgba(232, 116, 12, 0.2);
    --header-bg: rgba(253, 246, 236, 0.92);
    --overlay-bg: rgba(45, 27, 14, 0.5);
    --loading-bg: rgba(253, 246, 236, 0.92);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #1A1118;
    --bg-secondary: #211620;
    --bg-card: #2A1E28;
    --bg-card-hover: #352A34;
    --bg-elevated: #3A2E38;
    --border: rgba(255, 200, 160, 0.08);
    --border-hover: rgba(255, 200, 160, 0.15);
    --text-primary: #F5EDE0;
    --text-secondary: #B8A090;
    --text-muted: #7A6A5A;
    --accent-purple: #C06090;
    --accent-purple-light: #D080A5;
    --accent-blue: #C06090;
    --accent-green: #50C080;
    --accent-yellow: #F0901A;
    --accent-red: #E05050;
    --accent-pink: #D080A5;
    --gradient-primary: linear-gradient(135deg, #C06090, #F0901A);
    --gradient-warm: linear-gradient(135deg, #F0901A, #E05050);
    --gradient-cool: linear-gradient(135deg, #50C080, #F0901A);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(240, 144, 26, 0.25);
    --header-bg: rgba(26, 17, 24, 0.9);
    --overlay-bg: rgba(0, 0, 0, 0.7);
    --loading-bg: rgba(26, 17, 24, 0.92);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-yellow);
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 64px;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-stats {
    display: flex;
    gap: 12px;
}

.stat-pill {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.stat-label {
    color: var(--text-muted);
}

.stat-value {
    font-weight: 700;
    color: var(--text-primary);
}

.stat-pill.critical .stat-value {
    color: var(--accent-red);
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    margin-left: 8px;
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* ===== Main ===== */
.main {
    padding-top: 64px;
    min-height: 100vh;
}

/* ===== Upload Section ===== */
.upload-section {
    padding: 4rem 2rem;
}

.upload-hero {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.upload-hero-bg {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232, 116, 12, 0.10) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.upload-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    position: relative;
    z-index: 1;
}

/* Upload Zone */
.upload-zone {
    background: var(--bg-card);
    border: 2px dashed rgba(232, 116, 12, 0.35);
    border-radius: var(--radius-xl);
    padding: 3rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    margin-bottom: 3rem;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--accent-purple);
    background: rgba(232, 116, 12, 0.06);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.upload-zone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.upload-icon {
    width: 64px;
    height: 64px;
    background: rgba(232, 116, 12, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple-light);
    margin-bottom: 0.5rem;
}

.upload-icon svg {
    width: 32px;
    height: 32px;
}

.upload-zone h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.upload-zone p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.upload-formats {
    background: var(--bg-elevated);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: rgba(232, 116, 12, 0.10);
    color: var(--accent, #E8740C);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ===== Mapping Section ===== */
.mapping-section {
    padding: 3rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.section-header-left {
    flex: 1;
}

.section-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mapping-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

.mapping-preview {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    max-height: 200px;
    overflow-y: auto;
}

.mapping-preview table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.mapping-preview th {
    background: var(--bg-elevated);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.mapping-preview td {
    padding: 6px 12px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mapping-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.mapping-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.required {
    color: var(--accent-red);
}

.optional {
    color: var(--text-muted);
    font-weight: 400;
}

.mapping-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.mapping-select:focus {
    outline: none;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 3px rgba(232, 116, 12, 0.15);
}

.mapping-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(123, 45, 95, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 45, 95, 0.35);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* ===== Results Section ===== */
.results-section {
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Filter Buttons */
.filter-group {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent-purple);
    color: white;
}

/* Summary Dashboard */
.summary-dashboard {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.summary-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.score-card {
    background: linear-gradient(135deg, rgba(123, 45, 95, 0.08), rgba(232, 116, 12, 0.08));
    border-color: rgba(123, 45, 95, 0.15);
}

.score-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.score-ring svg {
    width: 100%;
    height: 100%;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 800;
}

.score-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-icon svg {
    width: 24px;
    height: 24px;
}

.missing-icon {
    background: rgba(201, 53, 53, 0.10);
    color: var(--accent-red);
}

.material-icon {
    background: rgba(232, 116, 12, 0.10);
    color: var(--accent-yellow);
}

.length-icon {
    background: rgba(123, 45, 95, 0.10);
    color: var(--accent-purple);
}

.summary-stat {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Reach Comparison */
.reach-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.reach-card {
    text-align: center;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    min-width: 160px;
}

.reach-card.potential {
    border-color: var(--accent-green);
}

.reach-card.missed {
    border-color: var(--accent-yellow);
}

.reach-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.reach-number {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.reach-card.potential .reach-number {
    color: var(--accent-green);
}

.reach-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.reach-arrow {
    color: var(--text-muted);
}

/* Volume & Priority Badges */
.volume-badge {
    display: inline-block;
    background: rgba(232, 116, 12, 0.1);
    color: var(--accent-yellow);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 4px;
}

.priority-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-critical {
    background: rgba(201, 53, 53, 0.12);
    color: var(--accent-red);
}

.priority-high {
    background: rgba(232, 116, 12, 0.12);
    color: var(--accent-yellow);
}

.priority-medium {
    background: rgba(123, 45, 95, 0.12);
    color: var(--accent-purple);
}

.priority-low {
    background: var(--bg-elevated);
    color: var(--text-muted);
}

.keyword-volume {
    font-size: 0.7rem;
    opacity: 0.8;
}


.top-keywords-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.top-keywords-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.keywords-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: default;
}

.keyword-tag .keyword-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
}

.keyword-tag.critical-tag {
    background: rgba(201, 53, 53, 0.10);
    color: var(--accent-red);
    border: 1px solid rgba(201, 53, 53, 0.2);
}

.keyword-tag.warning-tag {
    background: rgba(232, 116, 12, 0.10);
    color: var(--accent-yellow);
    border: 1px solid rgba(232, 116, 12, 0.2);
}

.keyword-tag.info-tag {
    background: rgba(123, 45, 95, 0.10);
    color: var(--accent-purple);
    border: 1px solid rgba(123, 45, 95, 0.2);
}

/* ===== Product Cards ===== */
.products-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    animation: fadeInUp 0.5s ease both;
}

.product-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

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

.product-card-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.product-card-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.product-card-image.no-image svg {
    width: 32px;
    height: 32px;
}

.product-card-info {
    min-width: 0;
}

.product-card-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card-issues {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.issue-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
}

.issue-badge.critical {
    background: rgba(201, 53, 53, 0.10);
    color: var(--accent-red);
}

.issue-badge.warning {
    background: rgba(232, 116, 12, 0.10);
    color: var(--accent-yellow);
}

.issue-badge.good {
    background: rgba(45, 139, 85, 0.10);
    color: var(--accent-green);
}

.product-card-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.mini-score {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    position: relative;
}

.mini-score::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 3px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.mini-score.score-good::before {
    background: var(--accent-green);
}

.mini-score.score-warning::before {
    background: var(--accent-yellow);
}

.mini-score.score-critical::before {
    background: var(--accent-red);
}

.mini-score-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--overlay-bg);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-elevated);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1;
}

.modal-close:hover {
    background: var(--accent-red);
    color: white;
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-content {
    padding: 2rem;
}

.modal-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.modal-image {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-elevated);
}

.modal-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.modal-image.no-image svg {
    width: 48px;
    height: 48px;
}

.modal-title-area {
    flex: 1;
    min-width: 0;
}

.modal-product-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.modal-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-elevated);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.modal-score-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-score-ring {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.modal-score-ring svg {
    width: 100%;
    height: 100%;
}

.modal-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 800;
}

.modal-score-details {
    flex: 1;
}

.modal-score-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-bar-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 120px;
    text-align: right;
}

.score-bar-track {
    flex: 1;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-bar-fill.good {
    background: var(--accent-green);
}

.score-bar-fill.warning {
    background: var(--accent-yellow);
}

.score-bar-fill.critical {
    background: var(--accent-red);
}

.score-bar-value {
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 30px;
}

/* Modal Sections */
.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section-title svg {
    width: 18px;
    height: 18px;
}

.suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.suggestion-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: var(--transition);
}

.suggestion-item:hover {
    border-color: var(--border-hover);
}

.suggestion-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.suggestion-icon.critical {
    background: rgba(201, 53, 53, 0.10);
    color: var(--accent-red);
}

.suggestion-icon.warning {
    background: rgba(232, 116, 12, 0.10);
    color: var(--accent-yellow);
}

.suggestion-icon.info {
    background: rgba(123, 45, 95, 0.10);
    color: var(--accent-purple);
}

.suggestion-text {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.5;
}

.suggestion-text strong {
    color: var(--accent-purple-light);
}

/* Long-tail keyword results */
.long-tail-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lt-query-group {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.lt-query-label {
    background: var(--bg-elevated);
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-yellow);
    border-bottom: 1px solid var(--border);
}

.lt-suggestions {
    display: flex;
    flex-direction: column;
}

.lt-suggestion {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.lt-suggestion:last-child {
    border-bottom: none;
}

.lt-suggestion:hover {
    background: var(--bg-card-hover);
}

.lt-suggestion.lt-covered {
    opacity: 0.5;
}

.lt-suggestion.lt-missing {
    color: var(--text-primary);
}

.lt-icon {
    font-size: 0.75rem;
    flex-shrink: 0;
}

.lt-text {
    flex: 1;
}

.lt-source {
    font-size: 0.6rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggested-name {
    background: var(--bg-primary);
    border: 1px solid rgba(232, 116, 12, 0.25);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-top: 0.75rem;
    position: relative;
}

.suggested-name-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-purple-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.suggested-name-text {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.suggested-name-text .highlight {
    background: rgba(232, 116, 12, 0.15);
    padding: 1px 4px;
    border-radius: 3px;
    color: var(--accent-yellow);
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--accent-purple);
    color: white;
    border-color: var(--accent-purple);
}

.keywords-found {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.keyword-pill {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
}

.keyword-pill.present {
    background: rgba(45, 139, 85, 0.10);
    color: var(--accent-green);
    border: 1px solid rgba(45, 139, 85, 0.2);
}

.keyword-pill.missing {
    background: rgba(201, 53, 53, 0.10);
    color: var(--accent-red);
    border: 1px solid rgba(201, 53, 53, 0.2);
    text-decoration: line-through;
    text-decoration-color: rgba(201, 53, 53, 0.4);
}

/* Description Preview */
.description-preview {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-height: 150px;
    overflow-y: auto;
}

.description-preview .desc-highlight {
    background: rgba(232, 116, 12, 0.15);
    padding: 1px 3px;
    border-radius: 2px;
    color: var(--accent-yellow);
}

/* ===== Loading ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--loading-bg);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    max-width: 440px;
    padding: 2rem;
}

/* Orbital Animation */
.loading-orbitals {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 2rem;
}

.orbital-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.ring-1 {
    inset: 0;
    border-top-color: var(--accent-yellow);
    border-right-color: rgba(232, 116, 12, 0.15);
    animation: orbit1 2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    filter: drop-shadow(0 0 6px rgba(232, 116, 12, 0.4));
}

.ring-2 {
    inset: 15px;
    border-top-color: var(--accent-purple);
    border-left-color: rgba(123, 45, 95, 0.15);
    animation: orbit2 2.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    filter: drop-shadow(0 0 6px rgba(123, 45, 95, 0.4));
}

.ring-3 {
    inset: 30px;
    border-bottom-color: var(--accent-green);
    border-right-color: rgba(16, 185, 129, 0.15);
    animation: orbit3 1.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.4));
}

.orbital-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-yellow);
    animation: pulse-glow 2s ease-in-out infinite;
}

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

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

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

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Progress Info */
.loading-info {
    margin-bottom: 1.5rem;
}

.loading-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    letter-spacing: -0.3px;
}

.loading-status {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Progress Bar */
.loading-progress-wrap {
    margin-bottom: 2rem;
}

.loading-progress-bar {
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.loading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-yellow), var(--accent-purple));
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.loading-progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-yellow);
    box-shadow: 0 0 12px var(--accent-yellow), 0 0 24px rgba(232, 116, 12, 0.3);
}

.loading-progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.loading-percent {
    font-weight: 700;
    color: var(--accent-yellow);
    font-size: 0.85rem;
}

/* Steps */
.loading-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 2rem;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.4;
    transition: all 0.3s;
}

.loading-step.active {
    opacity: 1;
    color: var(--accent-yellow);
}

.loading-step.done {
    opacity: 0.7;
    color: var(--accent-green);
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s;
}

.loading-step.active .step-dot {
    background: var(--accent-yellow);
    box-shadow: 0 0 8px var(--accent-yellow);
    animation: dot-pulse 1.5s ease-in-out infinite;
}

.loading-step.done .step-dot {
    background: var(--accent-green);
}

@keyframes dot-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }
}

.step-line {
    width: 24px;
    height: 2px;
    background: var(--border);
}

/* SEO Tips */
.loading-tip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
    animation: tip-fade 0.5s ease;
}

.tip-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.tip-text {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

@keyframes tip-fade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

/* ===== Ad Sidebars ===== */
.ad-sidebar {
    position: fixed;
    top: 80px;
    width: 160px;
    z-index: 50;
    display: none;
}

.ad-sidebar-left {
    left: 12px;
}

.ad-sidebar-right {
    right: 12px;
}

.ad-slot {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.4;
}

@media (min-width: 1600px) {
    .ad-sidebar {
        display: block;
    }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .upload-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .summary-dashboard {
        grid-template-columns: 1fr 1fr;
    }

    .mapping-form {
        grid-template-columns: 1fr;
    }

    .product-card {
        grid-template-columns: 1fr auto;
    }

    .product-card-image {
        display: none;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-header-right {
        flex-wrap: wrap;
        width: 100%;
    }

    .header-stats {
        display: none;
    }

    .modal-header {
        flex-direction: column;
    }

    .modal-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 600px) {
    .upload-section {
        padding: 2rem 1rem;
    }

    .results-section {
        padding: 2rem 1rem;
    }

    .mapping-section {
        padding: 2rem 1rem;
    }

    .summary-dashboard {
        grid-template-columns: 1fr;
    }

    .modal-score-section {
        flex-direction: column;
        text-align: center;
    }

    .score-bar-label {
        min-width: 80px;
    }
}