:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #14b8a6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f9fafb;
    --white: #ffffff;
    --border: #e5e7eb;
    --text-dark: #111827;
    --text-light: #6b7280;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-dark);
    padding: 0.5rem;
    transition: all 0.3s;
}

.mobile-menu-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.nav-links.mobile-active {
    display: flex;
}

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

.hero {
    text-align: center;
    padding: 4rem 2rem;
    color: white;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

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

.tool-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

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

.tool-card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.page-section {
    display: none;
}

.page-section.active {
    display: block;
}

.section-header {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    max-height: 85vh;
    overflow-y: auto;
    height: 85vh;
}

.form-section::-webkit-scrollbar {
    width: 8px;
}

.form-section::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.preview-section {
    position: sticky;
    top: 100px;
    height: 85vh;
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.required {
    color: var(--danger);
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: var(--light);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), var(--accent));
    color: white;
    width: 100%;
    padding: 1rem;
    margin-top: 1.5rem;
}

.btn-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-danger {
    background: var(--danger);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-add {
    background: var(--primary);
    color: white;
    margin-top: 1rem;
}

.btn-back {
    background: var(--text-light);
    color: white;
    margin-bottom: 1rem;
}

.dynamic-section {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
}

.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
}

.photo-upload {
    text-align: center;
    margin: 1.5rem 0;
}

.photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    margin: 1rem auto;
    border: 3px solid var(--primary);
    object-fit: cover;
    display: none;
}

.photo-preview.show {
    display: block;
}

input[type="file"] {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.file-label:hover {
    background: var(--primary-dark);
}

.preview-box {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 0.5rem;
}

.preview-box.objective {
    background: #eff6ff;
    border-left: 4px solid var(--primary);
}

.preview-box.declaration {
    background: #fef3c7;
    border-left: 4px solid var(--warning);
}

.resume-preview {
    background: white;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#resumeOutput {
    background: white;
    padding: 30px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    min-height: 100%;
    height: 100%;
    overflow-y: auto;
}

.resume-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.resume-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #000;
}

.resume-info {
    font-size: 12px;
}

.resume-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.resume-designation {
    font-size: 14px;
    margin-bottom: 8px;
}

.resume-photo-container {
    width: 100px;
    height: 120px;
    border: 2px solid #000;
    background: #f5f5f5;
}

.resume-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resume-section-header {
    background: #d3d3d3;
    padding: 6px 10px;
    font-weight: bold;
    font-size: 13px;
    margin-top: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.resume-content {
    padding: 0 10px;
    margin-bottom: 10px;
    font-size: 12px;
}

.qualification-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 12px;
}

.qualification-table th,
.qualification-table td {
    border: 1px solid #000;
    padding: 6px 8px;
    text-align: left;
}

.qualification-table th {
    background: #f0f0f0;
    font-weight: bold;
}

.resume-list {
    margin: 8px 0;
    padding-left: 25px;
}

.resume-list li {
    margin: 5px 0;
    line-height: 1.5;
}

.personal-info-grid {
    display: grid;
    grid-template-columns: 150px 20px 1fr;
    gap: 5px;
    margin: 8px 0;
}

.personal-info-grid > div:nth-child(3n+2) {
    text-align: center;
}

.declaration-text {
    margin: 10px 0;
    text-align: justify;
}

.signature-section {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* ATS-Friendly Resume Styles */
.ats-resume {
    font-family: 'Calibri', Arial, sans-serif;
    padding: 20px 30px;
}

.ats-header {
    text-align: center;
    border-bottom: 2.5px solid #000;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.ats-header h1 {
    font-size: 26px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.ats-contact {
    font-size: 12px;
    line-height: 1.6;
}

.ats-section {
    margin-bottom: 15px;
}

.ats-section-title {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 2px solid #000;
    padding-bottom: 3px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.ats-item {
    margin-bottom: 10px;
}

.ats-item-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 3px;
}

.ats-item-subheader {
    display: flex;
    justify-content: space-between;
    font-style: italic;
    font-size: 12px;
    margin-bottom: 5px;
}

.ats-content {
    font-size: 12px;
    line-height: 1.5;
}

.ats-bullet-list {
    margin: 5px 0 0 20px;
    padding: 0;
}

.ats-bullet-list li {
    margin-bottom: 4px;
    line-height: 1.4;
    font-size: 12px;
}

.ats-skills {
    margin-bottom: 6px;
}

.ats-skills strong {
    font-weight: bold;
}

.format-selector {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.format-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}

.format-option {
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.format-option:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.format-option.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.format-option input[type="radio"] {
    margin-right: 0.5rem;
}

.format-option label {
    font-weight: 600;
    cursor: pointer;
    display: block;
    margin: 0;
}

.format-option p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Cover Letter Styles */
.cover-letter-output {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    font-family: 'Calibri', Arial, sans-serif;
    line-height: 1.6;
    min-height: 600px;
}

.cover-letter-header {
    margin-bottom: 2rem;
}

.cover-letter-date {
    margin-bottom: 1.5rem;
    font-size: 14px;
}

.cover-letter-to {
    margin-bottom: 1.5rem;
    font-size: 14px;
}

.cover-letter-subject {
    margin-bottom: 1.5rem;
    font-weight: bold;
    font-size: 14px;
}

.cover-letter-body {
    font-size: 14px;
    text-align: justify;
}

.cover-letter-body p {
    margin-bottom: 1rem;
}

.cover-letter-signature {
    margin-top: 2rem;
    font-size: 14px;
}

.tone-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.tone-btn {
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-size: 0.9rem;
}

.tone-btn:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.tone-btn.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    font-weight: 600;
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, var(--dark) 0%, var(--text-dark) 100%);
    color: white;
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
}

.social-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.social-icon {
    font-size: 1.2rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
    margin: 0.25rem 0;
}

.bio-output {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    border-left: 4px solid var(--success);
    min-height: 150px;
    white-space: pre-wrap;
    line-height: 1.8;
}

.bio-templates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.template-btn {
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.template-btn:hover, .template-btn.active {
    border-color: var(--primary);
    background: rgba(99,102,241,0.1);
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    .preview-section {
        position: relative;
        top: 0;
        height: auto;
    }
    .form-section {
        height: auto;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* Mobile Navigation */
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
        display: none;
        z-index: 999;
    }
    
    .nav-links.mobile-active {
        display: flex;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: 1rem;
        width: 100%;
    }
    
    .nav-container {
        position: relative;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    .container {
        padding: 1rem;
    }
    .form-section {
        padding: 1.5rem;
    }
    .section-header h2 {
        font-size: 1.8rem;
    }
    .tool-card {
        padding: 1.5rem;
    }
    .format-options {
        grid-template-columns: 1fr;
    }
    .btn {
        width: 100%;
        padding: 1rem;
    }
    .btn-back {
        width: auto;
        padding: 0.75rem 1.5rem;
    }
    #resumeOutput {
        padding: 15px;
        font-size: 11px;
    }
    .resume-title {
        font-size: 18px;
    }
    .resume-name {
        font-size: 14px;
    }
    .qualification-table {
        font-size: 10px;
    }
    .qualification-table th,
    .qualification-table td {
        padding: 4px;
    }
    
    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer {
        padding: 2rem 1rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    .hero p {
        font-size: 0.9rem;
    }
    .section-header h2 {
        font-size: 1.5rem;
    }
    .nav-links a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    .tool-icon {
        font-size: 2rem;
    }
    .tool-card h3 {
        font-size: 1.2rem;
    }
    #resumeOutput {
        padding: 10px;
        font-size: 10px;
    }
    .resume-top {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .resume-photo-container {
        margin: 10px auto;
    }
    .personal-info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .personal-info-grid > div:nth-child(3n+2) {
        display: none;
    }
    .qualification-table {
        font-size: 9px;
    }
    .bio-templates {
        grid-template-columns: 1fr;
    }
}
