:root {
    --bg-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --accent-color: #38bdf8;
    --accent-secondary: #6366f1;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-blur: 12px;
}

body.light-mode {
    --bg-color: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.5);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-color: #0ea5e9;
}

.hidden {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.15;
    animation: move 20s infinite alternate;
}

.blob-1 { top: -100px; left: -100px; background: #38bdf8; }
.blob-2 { bottom: -100px; right: -100px; background: #6366f1; }
.blob-3 { top: 40%; left: 30%; background: #ec4899; }

@keyframes move {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 100px) scale(1.2); }
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.theme-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 0.5rem 1rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    backdrop-filter: blur(var(--glass-blur));
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

#upload-section {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.upload-area {
    border: 2px dashed var(--card-border);
    border-radius: 20px;
    padding: 4rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--accent-color);
    background: rgba(56, 189, 248, 0.05);
}

.upload-icon { font-size: 4rem; margin-bottom: 1rem; }

.primary-btn {
    background: var(--accent-color);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 14px;
    border: none;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
    transition: all 0.3s ease;
}

.primary-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.score-card { grid-column: span 4; }
.summary-card { grid-column: span 8; }
.chart-card { grid-column: span 6; }
.skills-card { grid-column: span 12; }
.feedback-card { grid-column: span 12; }
.recommendations-card { grid-column: span 7; }
.presence-card { grid-column: span 5; }

.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
    margin-top: 1rem;
}

.score-card .chart-container { height: 200px; }

h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.tag-cloud span {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

.tag-cloud.missing span {
    background: rgba(244, 63, 94, 0.1);
    border-color: rgba(244, 63, 94, 0.2);
    color: #fb7185;
}

.feedback-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

ul li {
    margin-bottom: 0.8rem;
    padding-left: 1.8rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.5;
}

.strengths li::before { content: "✓"; position: absolute; left: 0; color: #4ade80; font-weight: bold; }
.weaknesses li::before { content: "×"; position: absolute; left: 0; color: #fb7185; font-weight: bold; font-size: 1.2rem; }

.action-footer {
    grid-column: span 12;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.error-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.3);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    animation: slideIn 0.3s ease;
}

.error-icon { font-size: 1.5rem; }
#error-text { color: #fb7185; font-size: 0.9rem; line-height: 1.4; }
.small-btn { padding: 0.5rem 1rem !important; margin-top: 0 !important; font-size: 0.8rem; }

@keyframes slideIn {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.glass-input {
    width: 100%;
    height: 150px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    margin-top: 1rem;
    resize: vertical;
    backdrop-filter: blur(var(--glass-blur));
}

@media (max-width: 1024px) {
    .score-card, .summary-card, .chart-card, .recommendations-card, .presence-card {
        grid-column: span 12;
    }
    .feedback-split { grid-template-columns: 1fr; }
}
