.analysis-wrapper {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.analysis-header {
    padding: 2.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    background: var(--grad-surface);
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.analysis-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Score Section */
.score-section {
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.score-card-premium {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    padding: 2rem 3rem;
    background: var(--grad-dark);
    color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 550px;
    width: 100%;
}

.score-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.score-progress {
    fill: none;
    stroke: var(--primary-light);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value {
    font-size: 2.25rem;
    font-weight: 800;
    font-family: 'Outfit';
}

.score-percent {
    font-size: 1rem;
    opacity: 0.8;
}

.score-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.score-info p {
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* Main Analysis Grid */
.analysis-details {
    padding: 0 2rem 2rem;
    display: grid;
    gap: 2.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-title i {
    color: var(--primary);
    font-size: 1.25rem;
}

.section-title h2 {
    font-size: 1.5rem;
}

/* Gap Grid */
.gap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.gap-item {
    background: var(--bg-main);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gap-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.gap-requirement {
    font-weight: 700;
    font-size: 1.05rem;
}

.gap-status {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    width: fit-content;
}

.status-missing {
    background: #fee2e2;
    color: #991b1b;
}

.status-weak {
    background: #fef3c7;
    color: #92400e;
}

.status-partial {
    background: #e0e7ff;
    color: #3730a3;
}

.gap-comment {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Recommendations */
.premium-list {
    list-style: none;
}

.premium-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.premium-list li::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--success);
}

/* Revision Section */
.revision-footer {
    padding: 2.5rem;
    background: var(--bg-main);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.revision-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.revision-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Revised View */
.revised-view {
    padding: 2rem;
    animation: slideInUp 0.6s ease-out;
}

.revised-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.revised-editor-wrapper {
    background: #1e293b;
    padding: 0.5rem;
    /* Reduced to show the text area directly */
    border-radius: var(--radius-md);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
}

.icon-button {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.icon-button:hover {
    background: var(--bg-main);
    color: var(--primary);
    border-color: var(--primary);
}

.icon-button.success {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

#revised-resume-text {
    width: 100%;
    height: 500px;
    background: #0f172a;
    /* Explicit dark background for contrast */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    /* Cleaner than Courier for resumes */
    font-size: 1rem;
    line-height: 1.8;
    resize: vertical;
    outline: none;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.success-indicator {
    margin-top: 1rem;
    color: var(--success);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

/* Animations */
@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(.8);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

.pulse-animation {
    position: relative;
}

.pulse-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-md);
    border: 4px solid var(--accent);
    animation: pulse-ring 1.5s infinite;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .analysis-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }

    .score-card-premium {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .gap-grid {
        grid-template-columns: 1fr;
    }

    .revision-footer {
        flex-direction: column;
        text-align: center;
    }
}