:root {
    --primary-gradient: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    --primary: #7c3aed;
    --primary-light: #8b5cf6;
    --secondary: #3b82f6;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: var(--transition);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 1000;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    background: var(--primary-gradient);
    padding: 80px 20px;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* App Container */
.app-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Form Section */
.form-section {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-section h2,
.preview-section h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg);
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 16px;
}

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

.add-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.experience-entry,
.education-entry {
    background: var(--bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

/* Preview Section */
.preview-section {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.resume-preview {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    min-height: 600px;
    border: 1px solid var(--border);
}

.resume-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary);
}

.resume-name {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.resume-contact {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.resume-section {
    margin-bottom: 24px;
}

.resume-section h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.experience-item,
.education-item {
    margin-bottom: 16px;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.exp-header strong {
    color: var(--text);
}

.date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Download Button */
.download-btn {
    width: 100%;
    padding: 16px 32px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: var(--transition);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius);
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: modalSlide 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text);
}

.modal p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.pay-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.modal-note {
    font-size: 0.85rem !important;
    margin-top: 16px !important;
}

/* Footer */
.footer {
    background: var(--bg-card);
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.footer .copyright {
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 60px 20px;
    }

    .resume-preview {
        padding: 20px;
    }

    .resume-contact {
        flex-direction: column;
        gap: 8px;
    }

    .exp-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    .form-section,
    .preview-section {
        padding: 20px;
    }
}
