/**
 * Resume Builder - Main Styles
 */

/* CSS Variables */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-gray: #ecf0f1;
    --dark-gray: #7f8c8d;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--light-gray);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: white;
}

.features h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--dark-gray);
}

/* Pricing Section */
.pricing {
    padding: 4rem 0;
    background: var(--light-gray);
}

.pricing h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.plan {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.plan:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.plan.featured {
    border: 3px solid var(--primary-color);
}

.plan .badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.plan h4 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.price {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.price span {
    font-size: 1rem;
    color: var(--dark-gray);
}

.plan ul {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.plan li {
    padding: 0.5rem 0;
    color: var(--dark-gray);
}

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.auth-box {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.auth-box h2 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--dark-gray);
    margin-bottom: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--dark-gray);
    font-size: 0.85rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: auto;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #fee;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.alert-success {
    background: #efe;
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.alert-warning {
    background: #ffeaa7;
    color: #d63031;
    border: 1px solid var(--warning-color);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--dark-gray);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-footer p {
    margin: 0.5rem 0;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.footer-links a {
    color: white;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .features-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .nav {
        gap: 1rem;
    }

    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    box-shadow: var(--shadow);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.notification-success {
    background: var(--success-color);
    color: white;
}

.notification-error {
    background: var(--danger-color);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
/* ==============================
   🧩 TEMPLATE PREVIEW SYSTEM
   ============================== */

/* Base resume preview wrapper (YOU MUST HAVE THIS IN HTML) */
.editor-preview,
.resume-preview {
    transition: all 0.3s ease;
}

/* ==============================
   TEMPLATE 1 - Classic Professional
   ============================== */
body.template-1 .resume-preview {
    font-family: Arial, sans-serif;
    color: #2c3e50;
    background: #ffffff;
}

body.template-1 .section-header {
    border-left: 4px solid #3498db;
    padding-left: 10px;
}

/* ==============================
   TEMPLATE 2 - Modern Minimal
   ============================== */
body.template-2 .resume-preview {
    font-family: 'Segoe UI', sans-serif;
    background: #f7f9fc;
    color: #1f2937;
}

body.template-2 .section-header {
    border-bottom: 2px solid #e5e7eb;
}

/* ==============================
   TEMPLATE 3 - Creative Portfolio
   ============================== */
body.template-3 .resume-preview {
    font-family: 'Poppins', sans-serif;
    background: #111827;
    color: #ffffff;
}

body.template-3 .section-header {
    color: #fbbf24;
}

/* ==============================
   TEMPLATE 4 - Executive Premium
   ============================== */
body.template-4 .resume-preview {
    font-family: Georgia, serif;
    background: #ffffff;
    color: #111;
}

body.template-4 .section-header {
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #ccc;
}

/* ==============================
   TEMPLATE 5 - Tech Innovator
   ============================== */
body.template-5 .resume-preview {
    font-family: 'Roboto', sans-serif;
    background: #0f172a;
    color: #e2e8f0;
}

body.template-5 .section-header {
    color: #38bdf8;
}

/* ==============================
   TEMPLATE 6 - Academic Scholar
   ============================== */
body.template-6 .resume-preview {
    font-family: Times New Roman, serif;
    background: #ffffff;
    color: #000;
}

body.template-6 .section-header {
    font-style: italic;
}

/* ==============================
   GENERIC ACTIVE CARD UI (optional)
   ============================== */
.template-card.active {
    border: 2px solid var(--primary-color);
    transform: scale(1.03);
}
