@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #0b1120;
    --card-bg: rgba(23, 37, 84, 0.4);
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #22d3ee;
    --accent: #f43f5e;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-glow: rgba(255, 255, 255, 0.03);
    --shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(34, 211, 238, 0.15) 0px, transparent 50%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.nav-tabs {
    display: flex;
    gap: 1.5rem;
}

.nav-tab {
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-tab.active {
    color: var(--text-primary);
    background: var(--card-bg);
}

/* Glass Card Style */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transition: 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Upload Section */
.upload-area {
    border: 2px dashed var(--primary);
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(99, 102, 241, 0.05);
}

.upload-area:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--secondary);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.form-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Job Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.job-card {
    transition: all 0.3s ease;
}

.job-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.match-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.match-high { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.match-mid { background: rgba(234, 179, 8, 0.2); color: #facc15; }
.match-low {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.culture-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(167, 139, 250, 0.1);
    color: #a78bfa;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid rgba(167, 139, 250, 0.2);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: help;
}

.culture-badge i {
    font-size: 0.6rem;
}

.salary-badge {
    position: absolute;
    top: 3rem;
    right: 1rem;
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid rgba(74, 222, 128, 0.2);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.1);
}

.trend-indicator {
    font-size: 0.6rem;
    margin-top: 0.5rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.trend-indicator.up {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.pipeline-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
}

.pipeline-stepper::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1e1e2e;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.step.active .step-dot {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.step-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.step.active .step-label {
    color: white;
}

.job-card {
    position: relative;
    padding-top: 5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.job-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.skill-tag {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-color: var(--primary-glow);
}

.skill-tag.missing {
    color: var(--accent);
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

/* Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
}

.sidebar {
    height: fit-content;
    position: sticky;
    top: 2rem;
}

/* Transitions */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.upload-area.pulse {
    animation: pulse 2s infinite;
}

#recruiter-view, #candidate-results {
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--card-bg);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    width: 80%;
    max-width: 700px;
    animation: slideDown 0.3s ease-out;
}

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

.close {
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--text-primary);
}

.help-step {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--primary);
}

.help-step h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.help-step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* History List Styles */
.history-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

.history-item .timestamp {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

/* Roadmap Styles */
.roadmap-timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 2rem;
    padding-bottom: 2rem;
    overflow-x: auto;
}

.roadmap-node {
    flex: 1;
    min-width: 150px;
    text-align: center;
    position: relative;
    padding: 1rem;
}

.node-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: 700;
    box-shadow: 0 0 20px var(--primary-glow);
    z-index: 2;
    position: relative;
}

.node-content h4 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.node-content p {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.node-connector {
    position: absolute;
    top: 20px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background: linear-gradient(to right, var(--primary), transparent);
    z-index: 1;
}

@media (max-width: 768px) {
    .roadmap-timeline {
        flex-direction: column;
        align-items: center;
    }
    .node-connector {
        display: none;
    }
}

/* Learning Roadmap Styles */
.learning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.learning-card {
    border-top: 4px solid var(--primary);
    position: relative;
    padding-top: 2.5rem;
}

.week-badge {
    position: absolute;
    top: 0;
    left: 2rem;
    background: var(--primary);
    color: white;
    padding: 0.2rem 1rem;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.learning-card:hover {
    transform: translateY(-5px);
    border-top-color: var(--secondary);
}

/* Talent Heatmap Styling */
#talent-heatmap {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.leaflet-container {
    background: #0a0a12 !important;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: none !important;
}

.leaflet-control-zoom-in, .leaflet-control-zoom-out {
    background: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
    border: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(10px);
}

.leaflet-control-attribution {
    background: rgba(0, 0, 0, 0.7) !important;
    color: rgba(255, 255, 255, 0.3) !important;
    font-size: 0.6rem !important;
}

#map-loading p {
    animation: mapPulse 2s infinite;
}

@keyframes mapPulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Video AI Styling */
.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.stat-box label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#video-timer {
    background: rgba(239, 68, 68, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.video-placeholder {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #000 0%, #1e1e2e 100%) !important;
}

.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Resume Versions */
.version-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.version-item:hover {
    transform: translateX(5px);
    border-color: var(--secondary) !important;
}

.active-version {
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
    transform: scale(1.02);
}

/* Collaborative Hiring */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.05);
    height: 6px;
    border-radius: 5px;
    margin: 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--secondary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--secondary-glow);
}

#decision-modal ul li {
    margin-bottom: 0.5rem;
    position: relative;
}

#decision-modal ul li::before {
    content: '•';
    position: absolute;
    left: -1rem;
    color: var(--secondary);
}

/* Market Meter & Analytics */
.market-meter { width: 100%; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; margin: 10px 0; }
.market-fill { height: 100%; transition: width 1s ease-in-out; }
.difficulty-low { background: #4ade80; }
.difficulty-medium { background: #facc15; }
.difficulty-high { background: #fb923c; }
.difficulty-extreme { background: #ef4444; }

.diversity-chart { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.diversity-bar-container { display: flex; align-items: center; gap: 10px; }
.diversity-bar { flex-grow: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.05); position: relative; overflow: hidden; }
.diversity-fill { height: 100%; background: var(--primary); transition: width 1s ease; }

.migration-label {
    background: rgba(10, 10, 18, 0.9);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    pointer-events: none;
}

/* Unified Hub Layout */
.recruiter-hub-main { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; margin-top: 2rem; }
.hub-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.hub-nav-item { 
    padding: 1rem 1.2rem; border-radius: 8px; cursor: pointer; color: var(--text-secondary); transition: all 0.3s;
    display: flex; align-items: center; gap: 0.8rem; border: 1px solid transparent;
}
.hub-nav-item:hover { background: rgba(255,255,255,0.05); color: white; }
.hub-nav-item.active { background: var(--primary-glow); color: var(--primary); border: 1px solid var(--glass-border); }

/* Animation for Migration Lines */
@keyframes dash {
    to { stroke-dashoffset: 0; }
}
.migration-line {
    stroke-dasharray: 10;
    animation: dash 20s linear infinite;
    stroke-opacity: 0.6;
}

.pulse-node {
    animation: node-pulse 2s infinite;
}

@keyframes node-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.5); opacity: 0.2; }
    100% { transform: scale(1); opacity: 0.8; }
}
