/* /courses/assets/css/profile-optimizer.css */
.profile-optimizer-main {
    min-height: 100vh;
    background: #f0f2f5;
    padding: 2rem 0;
}

.profile-optimizer-main .container {
    max-width: 1300px;
}

/* ─── Page Header ────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.page-header h1 i {
    color: #0077b5;
    margin-right: 0.5rem;
}

.page-header p {
    color: #718096;
    font-size: 0.95rem;
}

.btn-outline {
    background: white;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: border-color 0.15s, color 0.15s;
}

.btn-outline:hover {
    border-color: #0077b5;
    color: #0077b5;
}

/* ─── Versions Panel ─────────────────────────────────── */
.versions-panel {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

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

.versions-header h4 {
    font-size: 1rem;
    color: #2d3748;
}

.btn-close {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
}

.btn-close:hover { color: #e53e3e; }

.versions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.version-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.15s, background 0.15s;
}

.version-item:hover {
    border-color: #0077b5;
    background: #f7fafc;
}

.version-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
}

.version-meta {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 0.1rem;
}

.version-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 4px;
    color: #a0aec0;
    transition: color 0.15s, background 0.15s;
}

.btn-danger-icon:hover {
    color: #e53e3e;
    background: #fff5f5;
}

/* ─── Two-Column Layout ──────────────────────────────── */
.optimizer-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ─── Input Panel ────────────────────────────────────── */
.optimizer-input-panel {
    background: white;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 5rem;
}

.optimizer-input-panel .form-group {
    margin-bottom: 1.25rem;
}

.optimizer-input-panel label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.char-count {
    font-weight: 400;
    font-size: 0.75rem;
    color: #a0aec0;
}

.optimizer-input-panel input[type="text"],
.optimizer-input-panel textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #2d3748;
    background: #f7fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.optimizer-input-panel input:focus,
.optimizer-input-panel textarea:focus {
    outline: none;
    border-color: #0077b5;
    box-shadow: 0 0 0 3px rgba(0, 119, 181, 0.12);
    background: white;
}

.optimizer-input-panel textarea {
    resize: vertical;
    min-height: 60px;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.lang-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    color: #718096;
    transition: background 0.15s, color 0.15s;
}

.lang-btn.active {
    background: #0077b5;
    color: white;
}

.lang-btn:hover:not(.active) {
    background: #f7fafc;
}

/* Button */
.btn-primary {
    background: linear-gradient(135deg, #0077b5 0%, #005f8d 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; border-radius: 10px; }
.btn-full { width: 100%; }

/* ─── Results Panel ──────────────────────────────────── */
.optimizer-results-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.result-section {
    background: white;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.result-section h3 {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #e2e8f0;
}

.result-section h3 i {
    margin-right: 0.5rem;
    width: 18px;
    text-align: center;
}

#quickWinsSection h3 i { color: #ed8936; }
#headlineSection h3 i { color: #0077b5; }
#aboutSection h3 i { color: #4299e1; }
#skillsSection h3 i { color: #48bb78; }
#keywordsSection h3 i { color: #9f7aea; }
#feedbackSection h3 i { color: #e53e3e; }

/* ─── Score Circle ───────────────────────────────────── */
.score-hero {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.score-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    position: relative;
}

.score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 8;
}

.score-fill {
    fill: none;
    stroke: #0077b5;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

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

.score-label {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #718096;
}

/* ─── Quick Wins ─────────────────────────────────────── */
.quick-win-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f2f5;
}

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

.quick-win-item i {
    color: #ed8936;
    margin-top: 3px;
    flex-shrink: 0;
}

.quick-win-item span {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.5;
}

/* ─── Before / After ─────────────────────────────────── */
.before-after {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ba-item {
    padding: 1rem;
    border-radius: 8px;
    position: relative;
}

.ba-before {
    background: #fff5f5;
    border: 1px solid #fed7d7;
}

.ba-after {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
}

.ba-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.ba-before .ba-label { color: #c53030; }
.ba-after .ba-label { color: #276749; }

.ba-content {
    font-size: 0.9rem;
    color: #2d3748;
    line-height: 1.5;
}

.ba-about {
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

.ba-arrow {
    text-align: center;
    color: #48bb78;
    font-size: 1.2rem;
}

.btn-copy {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: color 0.15s, background 0.15s;
}

.btn-copy:hover {
    color: #0077b5;
    background: rgba(0, 119, 181, 0.08);
}

.btn-copy.copied {
    color: #48bb78;
}

/* ─── Skills Chips ───────────────────────────────────── */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skills-group-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.skills-keep-label { color: #48bb78; }
.skills-add-label { color: #4299e1; }
.skills-remove-label { color: #e53e3e; }

.skills-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.skill-chip {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.skill-keep {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #c6f6d5;
}

.skill-add {
    background: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #bee3f8;
}

.skill-remove {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
    text-decoration: line-through;
}

.skills-empty {
    font-size: 0.85rem;
    color: #a0aec0;
    font-style: italic;
}

/* ─── Keywords Cloud ─────────────────────────────────── */
.keywords-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-chip {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, #ebf4ff, #e6e6fa);
    color: #553c9a;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid #d6bcfa;
}

/* ─── Feedback Cards ─────────────────────────────────── */
.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feedback-card {
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #e2e8f0;
    background: #f7fafc;
}

.feedback-high { border-left-color: #e53e3e; }
.feedback-medium { border-left-color: #ed8936; }
.feedback-low { border-left-color: #4299e1; }

.feedback-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.feedback-priority {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.priority-high { background: #fff5f5; color: #c53030; }
.priority-medium { background: #fffaf0; color: #c05621; }
.priority-low { background: #ebf8ff; color: #2b6cb0; }

.feedback-section {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 600;
}

.feedback-issue {
    font-size: 0.9rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.feedback-suggestion {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #4a5568;
    background: white;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
}

.feedback-suggestion i {
    color: #ed8936;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ─── Alerts ─────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
}

.alert-success { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
.alert-error { background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }
.alert-warning { background: #fffaf0; color: #c05621; border: 1px solid #feebc8; }
.alert-info { background: #ebf8ff; color: #2b6cb0; border: 1px solid #bee3f8; }

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

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
    .optimizer-layout {
        grid-template-columns: 1fr;
    }

    .optimizer-input-panel {
        position: static;
    }

    .page-header {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 600px) {
    .profile-optimizer-main {
        padding: 1rem 0;
    }

    .optimizer-input-panel,
    .result-section,
    .score-hero,
    .versions-panel {
        padding: 1.25rem;
        border-radius: 8px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }
}
