/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-purple: #8B5CF6;
    --primary-blue: #3B82F6;
    --primary-cyan: #06B6D4;
    --light-bg: #FFFFFF;
    --light-card: #F9FAFB;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --border-light: rgba(139, 92, 246, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--light-bg);
    min-height: 100vh;
    padding: 0;
    position: relative;
}

/* Animated Gradient Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg,
        #FFFFFF 0%,
        #F9FAFB 25%,
        #F3F4F6 50%,
        #F9FAFB 75%,
        #FFFFFF 100%);
}

body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -1;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
                radial-gradient(circle, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
    background-size: 50% 50%;
    background-position: 0% 0%, 100% 100%;
    animation: glowPulse 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
    50% { transform: translate(5%, 5%) scale(1.05); opacity: 1; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 24px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 100;
}

/* Product Hunt Badge (inside header actions) */
.product-hunt-badge {
    display: flex;
    align-items: center;
}

.product-hunt-badge a {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.product-hunt-badge a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.product-hunt-badge img {
    display: block;
    max-width: 100%;
    height: auto;
}

.header-left {
    text-align: left;
}

.header h1 {
    font-size: 2em;
    margin-bottom: 6px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Space Grotesk', sans-serif;
}

.subtitle {
    font-size: 0.95em;
    color: var(--text-secondary);
    font-weight: 500;
}

/* User session chip in header */
.user-session-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid var(--border-light);
    border-radius: 40px;
    padding: 6px 14px 6px 8px;
    backdrop-filter: blur(8px);
    animation: chipFadeIn 0.4s ease;
}

@keyframes chipFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.user-session-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    border: 2px solid rgba(139, 92, 246, 0.2);
}

.user-session-info {
    min-width: 0;
}

.user-session-name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    color: var(--text-primary);
}

.user-session-email {
    font-size: 11px;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    color: var(--text-secondary);
}

.user-session-logout {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    border-radius: 50%;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.user-session-logout:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

/* Header actions wrapper (History btn + profile chip) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 10;
}

.header-history-btn {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid var(--border-light);
    color: var(--primary-purple);
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.header-history-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    transform: translateY(-1px);
    border-color: var(--primary-purple);
}

/* Profile chip trigger button */
.user-chip-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    padding: 0;
    text-align: left;
}

.user-chip-arrow {
    font-size: 12px;
    opacity: 0.8;
    transition: transform 0.2s;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.user-session-chip.open .user-chip-arrow {
    transform: rotate(180deg);
}

/* Profile dropdown */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s;
}

.user-session-chip.open .profile-dropdown {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.user-session-chip {
    position: relative;
}

.profile-dropdown-list {
    padding: 8px 0;
    max-height: 240px;
    overflow-y: auto;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    color: #333;
}

.profile-dropdown-item:hover {
    background: #f8f9ff;
}

.profile-dropdown-item.active {
    background: #f0f0ff;
}

.profile-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-item-info {
    flex: 1;
    min-width: 0;
}

.profile-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-item-email {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-item-active-check {
    color: #667eea;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.profile-item-delete {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 13px;
    padding: 4px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
}

.profile-item-delete:hover {
    color: #e53e3e;
    background: #fff5f5;
}

.profile-dropdown-footer {
    border-top: 1px solid #f0f0f0;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-dropdown-add {
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: 1px dashed #c4b5fd;
    border-radius: 8px;
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
}

.profile-dropdown-add:hover {
    background: #f0f0ff;
}

/* Upload Section */
.upload-section {
    padding: 60px 40px;
}

.upload-box {
    border: 2px dashed var(--primary-purple);
    border-radius: 20px;
    padding: 80px 60px;
    text-align: center;
    transition: all 0.4s ease;
    background: rgba(139, 92, 246, 0.04);
    backdrop-filter: blur(10px);
}

.upload-box.dragover {
    background: rgba(139, 92, 246, 0.08);
    border-color: var(--primary-cyan);
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.2);
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.upload-box h2 {
    margin-bottom: 10px;
    color: var(--primary-purple);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.upload-box p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.file-info {
    margin-top: 15px;
    font-weight: 600;
    color: var(--primary-purple);
}

/* Job Description Section */
.jd-section {
    padding: 0 40px 60px;
}

.jd-box {
    background: rgba(139, 92, 246, 0.04);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-light);
}

.jd-box h3 {
    margin-bottom: 10px;
    color: var(--primary-purple);
    font-weight: 700;
}

.jd-box p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.jd-actions {
    margin-top: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: rgba(139, 92, 246, 0.08);
    color: var(--primary-purple);
    border: 1px solid var(--primary-purple);
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.15);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.4);
}

.btn-large {
    padding: 16px 50px;
    font-size: 18px;
}

.action-section {
    padding: 0 30px 40px;
    text-align: center;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 80px 40px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loading p {
    color: var(--primary-purple);
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.01em;
}

.spinner {
    border: 5px solid rgba(139, 92, 246, 0.1);
    border-top: 5px solid var(--primary-purple);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Section */
.results-section {
    padding: 60px 40px;
    background: transparent;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.results-header h2 {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2em;
    font-weight: 800;
}

/* Score Card */
.score-card {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
    color: white;
    border-radius: 20px;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 24px;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
}

.score-main {
    text-align: center;
}

.score-number {
    font-size: 5em;
    font-weight: 700;
    line-height: 1;
}

.score-label {
    font-size: 1.2em;
    opacity: 0.9;
    margin-top: 10px;
}

.score-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.score-item .label {
    font-weight: 600;
    opacity: 0.9;
}

.score-item .value {
    font-weight: 700;
    font-size: 1.1em;
}

/* Match Card */
.match-card {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    text-align: center;
}

.match-card h3 {
    margin-bottom: 20px;
    font-size: 1.5em;
}

.match-score {
    margin-bottom: 15px;
}

.match-number {
    font-size: 3em;
    font-weight: 700;
}

.match-label {
    font-size: 1.1em;
    opacity: 0.9;
}

.match-assessment {
    font-size: 1.1em;
    font-weight: 500;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-light);
    border-radius: 12px 12px 0 0;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    color: var(--text-secondary);
}

.tab-btn:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: var(--primary-purple);
}

.tab-btn.active {
    background: white;
    border-color: var(--primary-purple);
    color: var(--primary-purple);
    border-bottom-color: white;
    box-shadow: 0 -2px 8px rgba(139, 92, 246, 0.1);
}

.tab-content {
    background: transparent;
    padding: 40px 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Assessment Box */
.assessment-box {
    padding: 0 0 24px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.assessment-box h3 {
    color: var(--primary-purple);
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.assessment-box p {
    color: var(--text-primary);
    font-size: 1.05em;
    line-height: 1.8;
    max-width: 900px;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.strengths-box,
.weaknesses-box {
    padding: 0;
}

.strengths-box h4,
.weaknesses-box h4 {
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.strengths-box h4 {
    color: #10b981;
}

.weaknesses-box h4 {
    color: #f59e0b;
}

.strengths-box ul,
.weaknesses-box ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.strengths-box li,
.weaknesses-box li {
    padding: 0 0 0 32px;
    position: relative;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1.05em;
}

.strengths-box li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
    font-size: 1.3em;
}

.weaknesses-box li:before {
    content: "⚠";
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

/* Proficiency Overview */
.proficiency-overview {
    margin-bottom: 24px;
    padding: 0 0 24px 0;
    border-bottom: 1px solid var(--border-light);
}

.proficiency-overview h3 {
    margin-bottom: 16px;
    font-size: 1.4em;
    font-weight: 700;
    color: var(--primary-purple);
}

/* Upsell Section */
.upsell-section {
    margin-top: 40px;
    padding: 0;
}

.upsell-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 15px 50px rgba(102, 126, 234, 0.5);
    }
}

.upsell-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.upsell-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.upsell-title {
    color: white;
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.upsell-description {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1em;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.upsell-pricing {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.upsell-price-original {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5em;
    font-weight: 600;
    text-decoration: line-through;
    position: relative;
}

.upsell-price-free {
    color: #ffd700;
    font-size: 2.5em;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: priceGlow 2s ease-in-out infinite;
}

@keyframes priceGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 2px 10px rgba(0, 0, 0, 0.3);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 30px rgba(255, 215, 0, 0.9), 0 2px 10px rgba(0, 0, 0, 0.3);
        transform: scale(1.05);
    }
}

.upsell-button {
    background: white;
    color: #667eea;
    border: none;
    padding: 18px 50px;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    animation: pulseButton 2s ease-in-out infinite;
}

@keyframes pulseButton {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.upsell-button:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    animation: none;
}

.upsell-button:active {
    transform: scale(1.02);
}

.upsell-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    animation: none;
}

.upsell-button-text {
    position: relative;
}

.upsell-button-icon {
    font-size: 1.3em;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-15deg) scale(1.2);
    }
    75% {
        transform: rotate(15deg) scale(1.2);
    }
}

.upsell-offer {
    color: #ffd700;
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 0;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 2px 5px rgba(0, 0, 0, 0.2);
    }
}

/* Tech Gaps Box */
.tech-gaps-box {
    padding: 24px 0 0 0;
}

.tech-gaps-box h4 {
    margin-bottom: 16px;
    color: #0ea5e9;
    font-size: 1.3em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tech-gaps-box ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tech-gaps-box li {
    padding: 0 0 0 32px;
    position: relative;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1.05em;
}

.tech-gaps-box li:before {
    content: "🔧";
    position: absolute;
    left: 0;
    font-size: 1.1em;
}

/* Keywords Content */
.keyword-category {
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(139, 92, 246, 0.04);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.keyword-category h4 {
    color: var(--primary-purple);
    margin-bottom: 12px;
    text-transform: capitalize;
    font-weight: 700;
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keyword-tag {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.keyword-tag:hover {
    border-color: var(--primary-purple);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
    transform: translateY(-1px);
}

/* Stack Card */
.stack-card {
    padding: 24px 0 24px 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.stack-card:last-child {
    border-bottom: none;
}

.stack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.stack-name {
    font-weight: 700;
    color: var(--primary-purple);
    font-size: 1.3em;
}

.stack-completeness {
    background: #10b981;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.stack-missing {
    color: var(--text-secondary);
    font-size: 1em;
    margin-top: 12px;
    line-height: 1.6;
}

/* Stack card paragraphs */
.stack-card p {
    line-height: 1.6;
    color: var(--text-primary);
}

/* Proficiency Levels */
.proficiency-section {
    padding: 24px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.proficiency-section:last-child {
    border-bottom: none;
}

.proficiency-section h4 {
    margin-bottom: 16px;
    color: var(--primary-purple);
    font-weight: 700;
    font-size: 1.3em;
}

.proficiency-expert h4 { color: #10b981; }
.proficiency-advanced h4 { color: #3b82f6; }
.proficiency-intermediate h4 { color: #8b5cf6; }
.proficiency-basic h4 { color: #f59e0b; }

.proficiency-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.proficiency-section li {
    padding: 0 0 0 32px;
    position: relative;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1.05em;
}

.proficiency-section li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-purple);
    font-weight: 700;
    font-size: 1.3em;
}

/* Recommendations */
.rec-section {
    padding: 24px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.rec-section:last-child {
    border-bottom: none;
}

.rec-section h4 {
    color: var(--primary-purple);
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 1.3em;
}

.rec-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rec-section li {
    padding: 0 0 0 32px;
    position: relative;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1.05em;
}

.rec-section li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-purple);
    font-weight: 700;
    font-size: 1.3em;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 60px 20px;
    font-style: italic;
    font-size: 14px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 50px 40px;
    color: var(--text-secondary);
    background: transparent;
    border-top: 1px solid var(--border-light);
    margin-top: 80px;
    font-size: 0.95em;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.footer p {
    margin-bottom: 8px;
    font-weight: 500;
}

.footer a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    letter-spacing: 0.01em;
}

.footer a:hover {
    color: var(--primary-cyan);
    transform: translateY(-1px);
}

.footer-links {
    margin-top: 20px;
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.9em;
    padding: 4px 0;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }

    .product-hunt-badge {
        width: 100%;
        justify-content: center;
        order: 1;
    }

    .product-hunt-badge img {
        max-width: 220px;
    }

    .header-history-btn {
        order: 2;
        width: 100%;
    }

    .user-session-chip {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .upload-section {
        padding: 30px 20px;
    }

    .upload-box {
        padding: 40px 20px;
    }

    .upload-icon {
        font-size: 3em;
    }

    .upload-box h2 {
        font-size: 1.3em;
    }

    .upload-box p {
        font-size: 0.9em;
    }

    .loading {
        padding: 60px 20px;
        min-height: 250px;
    }

    .loading p {
        font-size: 1em;
    }

    .spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
        margin-bottom: 20px;
    }

    .results-section {
        padding: 30px 20px;
    }


    .score-card {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
        padding: 30px 20px;
    }

    .score-number {
        font-size: 3.5em;
    }

    .score-item {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .two-column {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 30px 0;
    }

    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .tab-content {
        padding: 20px;
    }

    .results-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .results-header h2 {
        font-size: 1.5em;
    }

    .btn-large {
        padding: 14px 30px;
        font-size: 16px;
        width: 100%;
    }

    .stack-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .upsell-card {
        padding: 30px 20px;
    }

    .upsell-title {
        font-size: 1.6em;
    }

    .upsell-description {
        font-size: 1em;
    }

    .upsell-button {
        padding: 16px 35px;
        font-size: 1em;
    }

    .upsell-price-original {
        font-size: 1.2em;
    }

    .upsell-price-free {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5em;
    }

    .subtitle {
        font-size: 0.9em;
    }

    .score-number {
        font-size: 2.5em;
    }

    .score-label {
        font-size: 1em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Enhancement Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    animation: slideUp 0.4s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
    color: white;
    padding: 28px 32px;
    text-align: center;
    flex-shrink: 0;
    position: relative;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 700;
}

.modal-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.enhancement-steps {
    margin-bottom: 20px;
    min-height: 340px;
}


.enhancement-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    opacity: 0;
    transform: translateX(-20px);
    animation: stepSlideIn 0.4s ease forwards;
}

@keyframes stepSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-icon {
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.08);
    flex-shrink: 0;
}

.step-icon.active {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
    animation: pulse 1.5s ease infinite;
}

.step-icon.completed {
    background: #4caf50;
}

.step-icon.looping {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
    animation: pulse 1.5s ease infinite, rotate 2s linear infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.05);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

.step-text {
    flex: 1;
}

.step-text strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 600;
}

.step-text span {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-purple), var(--primary-blue));
    width: 0;
    transition: width 0.5s ease;
    border-radius: 12px;
}

/* Resume Editor */
.modal-close {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) rotate(90deg);
}

.editor-container {
    display: flex;
    flex-direction: column;
    height: 80vh;
    max-height: 900px;
}

.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tool-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tool-btn:hover {
    background: #f8f9ff;
    border-color: #667eea;
}

.tool-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.toolbar-divider {
    width: 1px;
    height: 30px;
    background: #e0e0e0;
    margin: 0 10px;
}

.toolbar-select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    background: white;
    transition: border-color 0.2s;
}

.toolbar-select:hover {
    border-color: #667eea;
}

.toolbar-select:focus {
    outline: none;
    border-color: #667eea;
}

.toolbar-color-picker {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

.toolbar-color-picker:hover {
    border-color: #667eea;
}

.toolbar-right {
    display: flex;
    gap: 10px;
}

.editor-canvas-wrapper {
    flex: 1;
    position: relative;
    overflow: auto;
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

#editorCanvas {
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: white;
}

.editable-overlay {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.editable-text {
    position: absolute;
    pointer-events: all;
    cursor: text;
    padding: 4px;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0);
    min-width: 100px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.editable-text:hover {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.05);
}

.editable-text:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Responsive editor */
@media (max-width: 768px) {
    .editor-container {
        height: 70vh;
    }

    .editor-toolbar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .toolbar-left,
    .toolbar-right {
        justify-content: center;
    }

    .editor-canvas-wrapper {
        padding: 10px;
    }
}

/* ── History Panel ─────────────────────────────────────────────── */

.history-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.history-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.history-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 100vw;
    height: 100vh;
    background: white;
    z-index: 1201;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-panel.open {
    transform: translateX(0);
}

.history-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 20px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex-shrink: 0;
}

.history-panel-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
}

.history-panel-profile-name {
    font-size: 12px;
    opacity: 0.85;
}

.history-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.history-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.history-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.history-empty {
    text-align: center;
    color: #aaa;
    font-size: 14px;
    padding: 40px 20px;
    font-style: italic;
}

.history-loading {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 40px 20px;
}

/* History entry card */
.history-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid #eee;
    transition: box-shadow 0.2s;
}

.history-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.history-badge-analysis {
    background: #e8ecff;
    color: #4c63d2;
}

.history-badge-enhanced {
    background: #e8f5e9;
    color: #2e7d32;
}

.history-card-date {
    font-size: 11px;
    color: #aaa;
}

.history-card-body {
    margin-bottom: 12px;
}

.history-card-filename {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.history-card-meta {
    font-size: 13px;
    color: #666;
    display: flex;
    gap: 6px;
    align-items: center;
}

.history-card-actions {
    display: flex;
    gap: 8px;
}

.history-btn-download {
    flex: 1;
    padding: 7px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.history-btn-download:hover {
    opacity: 0.85;
}

.history-btn-delete {
    padding: 7px 12px;
    background: none;
    border: 1px solid #eee;
    color: #aaa;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.history-btn-delete:hover {
    color: #e53e3e;
    border-color: #fed7d7;
    background: #fff5f5;
}

@media (max-width: 480px) {
    .history-panel {
        width: 100vw;
    }
}

/* ── Get Extension Button (header) ───────────────────────────── */

.header-center {
    display: flex;
    align-items: center;
}

.get-extension-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.get-extension-btn:hover {
    background: rgba(255, 255, 255, 0.27);
    transform: translateY(-1px);
}

.get-extension-icon {
    font-size: 15px;
}

/* ── Extension Installation Modal ────────────────────────────── */

.ext-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.ext-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.ext-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-shrink: 0;
}

.ext-modal-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 3px;
}

.ext-modal-subtitle {
    font-size: 12px;
    opacity: 0.8;
}

.ext-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
    line-height: 1;
}

.ext-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.ext-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Feature highlights */
.ext-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.ext-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #444;
}

.ext-feature-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

/* Download button */
.ext-download-btn {
    display: block;
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    margin-bottom: 22px;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}

.ext-download-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* Installation steps */
.ext-steps-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #888;
    margin-bottom: 12px;
}

.ext-steps {
    padding-left: 18px;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ext-steps li {
    font-size: 13px;
    color: #444;
    line-height: 1.5;
}

.ext-steps strong {
    color: #222;
}

.ext-step-note {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.ext-step-icon {
    font-size: 14px;
}

.ext-steps code {
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
    color: #555;
}

/* Footer note */
.ext-note {
    font-size: 12px;
    color: #999;
    background: #f9fafb;
    border-radius: 8px;
    padding: 10px 14px;
    line-height: 1.5;
    border: 1px solid #e5e7eb;
}

.ext-note code {
    background: #e5e7eb;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
    color: #555;
}

/* ── Feedback Modal ──────────────────────────────────────────── */

.feedback-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.feedback-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.4s ease;
    overflow: hidden;
}

.feedback-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feedback-modal-title {
    font-size: 18px;
    font-weight: 700;
}

.feedback-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
}

.feedback-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg);
}

.feedback-modal-body {
    padding: 30px 24px;
}

.feedback-modal-subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
    text-align: center;
}

/* Star Rating */
.feedback-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.feedback-star {
    background: none;
    border: none;
    font-size: 40px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.feedback-star:hover,
.feedback-star.active {
    color: #ffd700;
    transform: scale(1.15);
}

.feedback-star.active {
    animation: starBounce 0.4s ease;
}

@keyframes starBounce {
    0%, 100% {
        transform: scale(1.15);
    }
    50% {
        transform: scale(1.3);
    }
}

/* Comment Box */
.feedback-comment {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
    margin-bottom: 20px;
    min-height: 100px;
}

.feedback-comment:focus {
    outline: none;
    border-color: #667eea;
}

.feedback-comment::placeholder {
    color: #aaa;
}

/* Submit Button */
.feedback-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
    margin-bottom: 12px;
}

.feedback-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.feedback-submit-btn:active {
    transform: translateY(0);
}

.feedback-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Skip Link */
.feedback-skip-btn {
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.feedback-skip-btn:hover {
    color: #667eea;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .feedback-modal {
        max-width: 100%;
    }
    
    .feedback-star {
        font-size: 32px;
    }
    
    .feedback-modal-body {
        padding: 24px 20px;
    }
}

/* ── Enhancement Wizard Modal ────────────────────────────────── */

.wizard-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 25px;
    right: 25px;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.wizard-step-number {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.08);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

.wizard-step.active .wizard-step-number {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
    color: white;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
    transform: scale(1.15);
}

.wizard-step.completed .wizard-step-number {
    background: #4caf50;
    color: white;
}

.wizard-step.completed .wizard-step-number::before {
    content: '✓';
}

.wizard-step-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
}

.wizard-step.active .wizard-step-label {
    color: var(--primary-purple);
}

.wizard-step.completed .wizard-step-label {
    color: #4caf50;
}

.wizard-content {
    min-height: 350px;
    max-height: 450px;
    overflow-y: auto;
    padding: 0 4px;
}

.wizard-pane {
    display: none;
}

.wizard-pane.active {
    display: block;
    animation: fadeInSlide 0.3s ease;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wizard-pane h4 {
    color: var(--primary-purple);
    font-size: 1.3em;
    margin-bottom: 8px;
    font-weight: 700;
}

.wizard-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(139, 92, 246, 0.04);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: var(--primary-purple);
    transform: translateY(-1px);
}

.checkbox-item.checked {
    background: rgba(139, 92, 246, 0.12);
    border-color: var(--primary-purple);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary-purple);
}

.checkbox-item label {
    flex: 1;
    cursor: pointer;
    min-width: 0;
}

.checkbox-item-content {
    flex: 1;
    min-width: 0;
}

.checkbox-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 14px;
}

.checkbox-item-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.checkbox-item-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-purple);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    letter-spacing: 0.3px;
}

.checkbox-item-badge.critical {
    background: #dc2626;
}

.checkbox-item-badge.recommended {
    background: #f59e0b;
}

.wizard-footer {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 24px 32px;
    border-top: 1px solid var(--border-light);
    background: rgba(249, 250, 251, 0.8);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.wizard-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-style: italic;
}

.wizard-empty-state .wizard-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

@media (max-width: 600px) {
    .wizard-progress {
        margin-bottom: 24px;
    }

    .wizard-step-label {
        font-size: 10px;
    }

    .wizard-step-number {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .wizard-content {
        min-height: 300px;
        max-height: 350px;
    }

    .wizard-footer {
        padding: 16px 20px;
    }

    .wizard-footer button {
        font-size: 14px;
        padding: 10px 16px;
    }

    #wizardBackBtn,
    #wizardSkipBtn {
        padding: 8px 12px;
        font-size: 13px;
    }
}
