/* ===================================
   CSS Variables & Reset
   =================================== */
:root {
    --primary-color: #4F46E5;
    --primary-dark: #4338CA;
    --secondary-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --bg-color: #F9FAFB;
    --surface-color: #FFFFFF;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg-color: #111827;
    --surface-color: #1F2937;
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --border-color: #374151;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

/* ===================================
   Header & Navigation
   =================================== */
.header {
    background: var(--surface-color);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.75rem;
}

.nav {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.5rem;
    transition: var(--transition);
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.nav-btn.active {
    background: var(--primary-color);
    color: white;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===================================
   Main Content & Views
   =================================== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

.view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================================
   Home View - Hero Section
   =================================== */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 1rem;
    color: white;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===================================
   Features Grid
   =================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* ===================================
   Builder Container
   =================================== */
/* Upload Resume Section */
.upload-resume-section {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
}

.upload-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 2px dashed var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.upload-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.upload-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.upload-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.upload-card small {
    display: block;
    margin-top: 1rem;
    color: var(--text-secondary);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.builder-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    min-height: 600px;
}

.builder-sidebar {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 1px solid var(--border-color);
}

.wizard-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.step:hover {
    background: var(--bg-color);
}

.step.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
}

.step-number {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.step.active .step-number {
    background: white;
    color: var(--primary-color);
}

.step-label {
    font-weight: 600;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ===================================
   Builder Content
   =================================== */
.builder-content {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.builder-step {
    display: none;
}

.builder-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.step-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
}

/* ===================================
   Form Elements
   =================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--surface-color);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

/* ===================================
   Buttons
   =================================== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--text-primary);
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-ai {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-ai:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ===================================
   Experience & Education Cards
   =================================== */
.experience-item,
.education-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
    position: relative;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
}

/* ===================================
   Templates Grid
   =================================== */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.template-card {
    background: var(--surface-color);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid var(--border-color);
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.template-preview {
    height: 400px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mini Resume Previews */
.mini-resume {
    width: 90%;
    height: 90%;
    background: white;
    padding: 1rem;
    font-size: 0.65rem;
    line-height: 1.3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Classic Preview */
.classic-preview {
    font-family: 'Times New Roman', serif;
}
.mini-header {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 0.3rem;
    color: #1a1a1a;
}
.mini-contact {
    text-align: center;
    font-size: 0.6rem;
    margin-bottom: 0.8rem;
    color: #555;
}
.mini-section {
    font-weight: bold;
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.1rem;
    font-size: 0.7rem;
}
.mini-text {
    margin: 0.2rem 0;
    color: #333;
}

/* Modern Preview */
.modern-preview {
    font-family: 'Arial', sans-serif;
    padding: 1.5rem 1rem;
}
.mini-name {
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 0.3rem;
}
.mini-line {
    height: 2px;
    background: #000;
    width: 30%;
    margin: 0.5rem 0;
}
.mini-info {
    font-size: 0.6rem;
    color: #666;
    margin-bottom: 0.8rem;
}
.mini-title {
    font-size: 0.65rem;
    font-weight: bold;
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.mini-item {
    font-size: 0.6rem;
    margin: 0.2rem 0;
    color: #444;
}

/* Elegant Preview */
.elegant-preview {
    font-family: Georgia, serif;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 30%);
}
.mini-name-elegant {
    font-size: 1.4rem;
    color: #4F46E5;
    text-align: center;
    margin-bottom: 0.2rem;
    font-weight: 600;
}
.mini-contact-elegant {
    text-align: center;
    font-size: 0.6rem;
    color: #666;
    margin-bottom: 0.8rem;
}
.mini-section-elegant {
    font-size: 0.7rem;
    font-weight: bold;
    color: #4F46E5;
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mini-content {
    font-size: 0.6rem;
    margin: 0.2rem 0;
    color: #444;
}

/* Creative Preview */
.creative-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 1rem;
}
.mini-name-creative {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.2rem;
    letter-spacing: 1px;
}
.mini-tagline {
    font-size: 0.7rem;
    opacity: 0.9;
    margin-bottom: 0.8rem;
}
.mini-section-creative {
    font-size: 0.7rem;
    font-weight: bold;
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}
.mini-bar {
    height: 3px;
    background: rgba(255,255,255,0.5);
    width: 40%;
    margin: 0.3rem 0;
}
.mini-job {
    font-size: 0.6rem;
    margin: 0.3rem 0;
}

/* Corporate Preview */
.corporate-preview {
    font-family: Arial, sans-serif;
    border-left: 4px solid #1a73e8;
    padding-left: 1.2rem;
}
.mini-corp-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 0.2rem;
}
.mini-corp-contact {
    font-size: 0.6rem;
    color: #666;
    margin-bottom: 0.8rem;
}
.mini-corp-section {
    font-size: 0.65rem;
    font-weight: bold;
    color: #1a73e8;
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}
.mini-corp-job {
    font-size: 0.65rem;
    font-weight: 600;
    margin: 0.2rem 0;
}
.mini-corp-company {
    font-size: 0.6rem;
    color: #666;
    margin: 0.1rem 0;
}

/* Student Preview */
.student-preview {
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(to bottom right, #e3f2fd, #ffffff);
}
.mini-student-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1976d2;
    text-align: center;
    margin-bottom: 0.2rem;
}
.mini-student-info {
    text-align: center;
    font-size: 0.65rem;
    color: #666;
    margin-bottom: 0.8rem;
}
.mini-student-section {
    font-size: 0.7rem;
    font-weight: bold;
    color: #1976d2;
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
    border-bottom: 2px solid #1976d2;
    padding-bottom: 0.1rem;
}
.mini-student-text {
    font-size: 0.6rem;
    margin: 0.2rem 0;
}

/* Tech Preview */
.tech-preview {
    font-family: 'Courier New', monospace;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.2rem;
}
.mini-tech-name {
    font-size: 1.1rem;
    color: #4ec9b0;
    margin-bottom: 0.2rem;
}
.mini-tech-role {
    font-size: 0.65rem;
    color: #ce9178;
    margin-bottom: 0.8rem;
}
.mini-tech-section {
    font-size: 0.65rem;
    color: #6a9955;
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
}
.mini-tech-item {
    font-size: 0.6rem;
    color: #d4d4d4;
    margin: 0.2rem 0;
}

/* Data Preview */
.data-preview {
    font-family: Arial, sans-serif;
}
.mini-data-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.2rem;
}
.mini-data-role {
    font-size: 0.7rem;
    color: #3498db;
    font-weight: 600;
    margin-bottom: 0.8rem;
}
.mini-data-section {
    font-size: 0.65rem;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
}
.mini-data-item {
    font-size: 0.6rem;
    color: #555;
    margin: 0.2rem 0;
}

/* Marketing Preview */
.marketing-preview {
    font-family: Arial, sans-serif;
    background: linear-gradient(to right, #ff6b6b 0%, #ffffff 20%);
}
.mini-mkt-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #c92a2a;
    margin-bottom: 0.2rem;
}
.mini-mkt-role {
    font-size: 0.7rem;
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.8rem;
}
.mini-mkt-section {
    font-size: 0.65rem;
    font-weight: bold;
    color: #c92a2a;
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
}
.mini-mkt-item {
    font-size: 0.6rem;
    color: #333;
    margin: 0.2rem 0;
    font-weight: 500;
}

/* Executive Preview */
.executive-preview {
    font-family: Georgia, serif;
    background: linear-gradient(to bottom, #2c3e50 0%, #34495e 20%, #ffffff 20%);
    color: #2c3e50;
}
.mini-exec-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ecf0f1;
    text-align: center;
    margin-bottom: 0.2rem;
    padding-top: 0.5rem;
    letter-spacing: 2px;
}
.mini-exec-title {
    font-size: 0.65rem;
    color: #bdc3c7;
    text-align: center;
    margin-bottom: 0.5rem;
}
.mini-exec-line {
    height: 1px;
    background: #ecf0f1;
    margin: 0 2rem 0.8rem;
}
.mini-exec-section {
    font-size: 0.65rem;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 0.6rem;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.mini-exec-text {
    font-size: 0.6rem;
    color: #555;
    margin: 0.2rem 0;
}

.template-placeholder {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
}

.template-card h3 {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 1.25rem;
}

.template-card p {
    padding: 0 1.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.template-card .btn {
    width: calc(100% - 3rem);
    margin: 0 1.5rem 1.5rem;
}

/* ===================================
   Resume Preview
   =================================== */
.preview-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.preview-actions select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 1rem;
}

.resume-preview {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    margin-top: 2rem;
    min-height: 800px;
    border: 1px solid var(--border-color);
}

/* ===================================
   ATS Checker
   =================================== */
.ats-container {
    max-width: 1200px;
    margin: 0 auto;
}

.ats-container h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.ats-content {
    display: grid;
    gap: 2rem;
}

.ats-input-section {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.ats-results {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.ats-score-card {
    text-align: center;
    margin-bottom: 2rem;
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.score-circle svg {
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 8;
}

.score-fill {
    fill: none;
    stroke: var(--secondary-color);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s ease;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary-color);
}

.score-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.ats-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.detail-card {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 2px solid var(--border-color);
}

.detail-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-card h4 i {
    color: var(--primary-color);
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.keyword-tag.missing {
    background: var(--danger-color);
}

.recommendations-list {
    list-style: none;
}

.recommendations-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.recommendations-list li:last-child {
    border-bottom: none;
}

.recommendations-list li:before {
    content: "→";
    margin-right: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* ===================================
   Loading Overlay
   =================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    margin-top: 1rem;
    font-size: 1.125rem;
}

/* ===================================
   Toast Notifications
   =================================== */
.toast-container {
    position: fixed;
    top: 100px;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: var(--surface-color);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--primary-color);
    min-width: 300px;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toast.success {
    border-left-color: var(--secondary-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===================================
   Modal
   =================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 1rem;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-xl);
}

.modal-content h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-content input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    margin: 1rem 0;
    font-size: 1rem;
    background: var(--surface-color);
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-actions .btn {
    flex: 1;
}

/* ===================================
   Cover Letter Generator
   =================================== */
.cover-letter-container {
    max-width: 1400px;
    margin: 0 auto;
}

.cover-letter-container h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.cover-letter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.cover-letter-form {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.cover-letter-preview {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    min-height: 600px;
    position: sticky;
    top: 100px;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

.preview-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.cover-letter-preview .letter-content {
    line-height: 1.8;
    white-space: pre-wrap;
    font-family: 'Times New Roman', serif;
}

.cover-letter-preview .letter-content p {
    margin-bottom: 1rem;
}

.cover-letter-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

/* ===================================
   Resume Parser/Upload
   =================================== */
.upload-section {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 2px dashed var(--border-color);
    text-align: center;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.upload-section:hover {
    border-color: var(--primary-color);
    background: var(--bg-color);
}

.upload-section.dragover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.1);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.parsing-status {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    display: none;
}

.parsing-status.active {
    display: block;
}

.parsing-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .builder-container {
        grid-template-columns: 1fr;
    }

    .builder-sidebar {
        position: static;
    }

    .wizard-steps {
        flex-direction: row;
        overflow-x: auto;
    }

    .step-label {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .templates-grid {
        grid-template-columns: 1fr;
    }

    .ats-details {
        grid-template-columns: 1fr;
    }

    .cover-letter-content {
        grid-template-columns: 1fr;
    }

    .cover-letter-preview {
        position: static;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* ===================================
   Print Styles for Resume
   =================================== */
@media print {
    body * {
        visibility: hidden;
    }
    
    .resume-preview,
    .resume-preview * {
        visibility: visible;
    }
    
    .resume-preview {
        position: absolute;
        left: 0;
        top: 0;
    }
}
