:root {
    --primary: #8B5CF6;
    --primary-hover: #7C3AED;
    --secondary: #A78BFA;
    --accent: #F472B6;
    --bg-main: #0F0A1A;
    --bg-panel: rgba(25, 17, 43, 0.6);
    --bg-panel-border: rgba(139, 92, 246, 0.2);
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --radius: 16px;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(244, 114, 182, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
}

.app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Typography & Header */
.header {
    text-align: center;
    margin-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Glass Panels */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--bg-panel-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.5);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-text {
    background: transparent;
    color: var(--secondary);
    padding: 0.5rem 1rem;
}

.btn-text:hover {
    color: var(--text-primary);
    background: rgba(167, 139, 250, 0.1);
}

/* Input Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
}

textarea {
    width: 100%;
    height: 250px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--bg-panel-border);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

textarea::placeholder {
    color: var(--text-muted);
}

.actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    align-items: center;
}

/* Results Section */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.5s ease;
}

.hidden {
    display: none !important;
}

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

/* Overall Score */
.score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.score-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.score-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.score-circle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.score-circle {
    width: 180px;
    height: 180px;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 80%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out;
}

.purple .circle {
    stroke: var(--primary);
}

.green .circle {
    stroke: var(--success);
}

.yellow .circle {
    stroke: var(--warning);
}

.red .circle {
    stroke: var(--danger);
}

.percentage {
    fill: var(--text-primary);
    font-family: inherit;
    font-size: 0.45em;
    font-weight: 700;
    text-anchor: middle;
}

.score-benchmark {
    font-size: 1.1rem;
    color: var(--secondary);
    font-weight: 500;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.metric-card {
    padding: 1.25rem;
}

.metric-card h3 {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metric-score {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary);
    width: 0%;
    border-radius: 3px;
    transition: width 1s ease-out;
}

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

/* Analysis Details */
.analysis-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .analysis-details {
        grid-template-columns: 1fr;
    }
}

.detail-card h3 {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--bg-panel-border);
    padding-bottom: 0.5rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.missing-skills h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(139, 92, 246, 0.15);
    color: var(--secondary);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.tag.missing {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.1);
    border-style: dashed;
}

.check-list {
    list-style: none;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.check-list li:last-child {
    border-bottom: none;
}

.check-status {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.7rem;
}

.check-status.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.check-status.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Recommendations */
.recommendations h3 {
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestion-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.suggestion-list li {
    padding: 1rem;
    background: rgba(244, 114, 182, 0.05);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
}

/* Footer & Toast */
.footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 2rem;
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: opacity 0.3s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
