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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #cfe0c3;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: #333;
}

.container {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Header Styles */
.header {
    text-align: center;
    background: #40798c;
    color: white;
    padding: 50px 20px;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 48px;
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    text-shadow: none;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-top: 10px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 0;
    padding: 40px 5%;
    box-shadow: none;
    min-height: 400px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 1200px) {
    .main-content {
        padding: 60px 8%;
    }
}

/* Upload Section */
.upload-section {
    padding: 30px 0;
}

.upload-card {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.upload-card h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #1f363d;
}

.upload-description {
    color: #1f363d;
    margin-bottom: 35px;
    font-size: 1.1rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #70a9a1;
    border-radius: 4px;
    padding: 60px 20px;
    margin: 30px 0;
    cursor: pointer;
    transition: border-color 0.2s ease;
    background: #9ec1a3;
}

.upload-area:hover {
    border-color: #40798c;
}

.upload-area.drag-over {
    border-color: #40798c;
}

.upload-cloud {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.upload-placeholder p {
    margin: 8px 0;
    color: #1f363d;
}

.file-types {
    color: #40798c;
    font-size: 0.9rem;
}

/* Selected File */
.selected-file {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: #9ec1a3;
    border-radius: 4px;
    margin: 20px 0;
    color: #1f363d;
}

.file-icon {
    font-size: 24px;
}

.file-name {
    flex: 1;
    font-weight: 500;
}

.remove-file {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #40798c;
    padding: 5px 10px;
    border-radius: 4px;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-outline {
    padding: 16px 32px;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: #40798c;
    color: white;
    box-shadow: none;
}

.btn-primary:hover:not(:disabled) {
    background: #70a9a1;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #70a9a1;
    color: white;
}

.btn-secondary:hover {
    background: #40798c;
}

.btn-outline {
    background: white;
    color: #40798c;
    border: 2px solid #40798c;
}

.btn-outline:hover {
    background: #9ec1a3;
}

.btn-arrow {
    font-size: 1.3rem;
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 60px 20px;
}

.loader {
    border: 4px solid #cfe0c3;
    border-top: 4px solid #40798c;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f363d;
    margin-bottom: 10px;
}

.loading-subtext {
    color: #40798c;
}

/* Results Section */
.results-section {
    max-width: 1400px;
    margin: 0 auto;
}

/* Two Column Layout */
.results-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start;
}

.results-main-content {
    min-width: 0;
    padding-bottom: 40px;
    overflow: hidden;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h2 {
    font-size: 2.2rem;
    color: #1f363d;
}

/* Primary Match */
.primary-match {
    background: #40798c;
    color: white;
    padding: 40px;
    border-radius: 4px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: none;
    max-width: 100%;
}

.match-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.match-role {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.confidence-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 12px;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.confidence-fill {
    background: white;
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
    box-shadow: none;
}

.confidence-text {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Recommendations */
.recommendations {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.6rem;
    color: #1f363d;
    margin-bottom: 20px;
    font-weight: 700;
}

.recommendation-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 0;
}

.recommendation-card {
    background: #9ec1a3;
    border: 2px solid #70a9a1;
    border-radius: 4px;
    padding: 25px;
    transition: border-color 0.2s ease;
    position: relative;
}

.recommendation-card:hover {
    border-color: #40798c;
}

.card-rank {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #40798c;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.card-title {
    font-size: 1.3rem;
    color: #1f363d;
    margin-bottom: 15px;
    padding-right: 40px;
}

.card-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.stat {
    flex: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: #40798c;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #40798c;
}

.card-skills {
    margin-top: 15px;
}

.skills-label {
    font-size: 0.9rem;
    color: #40798c;
    margin-bottom: 8px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: #70a9a1;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.skill-tag.missing {
    background: #cfe0c3;
    color: #1f363d;
}

/* Skills Analysis */
.skills-analysis {
    margin-bottom: 0;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}

.skill-badge {
    background: #40798c;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
    margin-bottom: 30px;
}

/* Sidebar Styles */
.results-sidebar {
    position: sticky;
    top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    padding-bottom: 20px;
    scroll-behavior: smooth;
    align-self: start;
    width: 320px;
    flex-shrink: 0;
}

.sidebar-card {
    background: white;
    border: 2px solid #70a9a1;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(64, 121, 140, 0.1);
}

.sidebar-title {
    font-size: 1.1rem;
    color: #1f363d;
    margin-bottom: 15px;
    font-weight: 700;
}

/* Stats Card */
.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #cfe0c3;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #9ec1a3;
    border-radius: 4px;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: #40798c;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f363d;
}

/* Sidebar Actions */
.sidebar-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #70a9a1;
    border-radius: 4px;
    color: #1f363d;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.sidebar-btn:last-child {
    margin-bottom: 0;
}

.sidebar-btn:hover {
    background: #40798c;
    color: white;
    border-color: #40798c;
}

.sidebar-btn-icon {
    font-size: 18px;
}

/* Tips Card */
.tip-item {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: start;
}

.tip-item:last-child {
    margin-bottom: 0;
}

.tip-number {
    background: #40798c;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.tip-item p {
    font-size: 0.9rem;
    color: #1f363d;
    line-height: 1.5;
    margin: 0;
}

/* Confidence Meter */
.confidence-meter {
    text-align: center;
}

.meter-value {
    font-size: 2rem;
    font-weight: 700;
    color: #40798c;
    margin-bottom: 15px;
}

.meter-bar {
    background: #cfe0c3;
    height: 12px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.meter-fill {
    background: #40798c;
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.meter-label {
    font-size: 0.85rem;
    color: #40798c;
}

/* Error Section */
.error-section {
    text-align: center;
    padding: 60px 20px;
}

.error-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.error-section h3 {
    font-size: 1.8rem;
    color: #40798c;
    margin-bottom: 15px;
}

.error-message {
    color: #40798c;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    text-align: center;
    background: #1f363d;
    color: white;
    padding: 40px 20px;
    margin-top: 0;
    opacity: 1;
    width: 100%;
}

.footer p {
    margin: 8px 0;
}

.footer-note {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .results-layout {
        grid-template-columns: 1fr;
    }
    
    .results-sidebar {
        position: static;
        max-height: none;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-top: 30px;
        overflow-y: visible;
        padding-right: 0;
    }
    
    .recommendation-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .job-portals {
        flex-direction: column;
    }
    
    .questions-container {
        flex-direction: column;
    }
    
    .interview-questions {
        flex-direction: column;
    }
    
    .interview-role-section {
        margin-bottom: 25px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header {
        padding: 40px 20px;
    }
    
    .main-content {
        padding: 40px 20px;
    }
    
    .results-sidebar {
        position: static;
        max-height: none;
        grid-template-columns: 1fr;
        overflow-y: visible;
    }
    
    .match-role {
        font-size: 1.8rem;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .recommendation-cards {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary, .btn-outline {
        width: 100%;
        justify-content: center;
    }
    
    .primary-match {
        padding: 30px 20px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .results-header h2 {
        font-size: 1.7rem;
    }
    
    .career-skills-wrapper {
        padding: 30px 0;
    }
    
    .job-portals {
        flex-direction: column;
    }
    
    .job-links {
        flex-direction: column;
    }
    
    .questions-container {
        flex-direction: column;
    }
}

/* Custom Scrollbar Styling */
.results-sidebar::-webkit-scrollbar {
    width: 8px;
}

.results-sidebar::-webkit-scrollbar-track {
    background: #cfe0c3;
    border-radius: 4px;
}

.results-sidebar::-webkit-scrollbar-thumb {
    background: #70a9a1;
    border-radius: 4px;
}

.results-sidebar::-webkit-scrollbar-thumb:hover {
    background: #40798c;
}

/* Firefox Scrollbar */
.results-sidebar {
    scrollbar-width: thin;
    scrollbar-color: #70a9a1 #cfe0c3;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.results-section {
    animation: fadeIn 0.4s ease;
}

/* Best Fit Section */
.best-fit-section {
    margin-bottom: 30px;
    padding: 30px;
    background: #cfe0c3;
    margin-left: 0;
    margin-right: 0;
    border-radius: 4px;
}

.section-description {
    color: #40798c;
    margin-bottom: 20px;
    font-size: 1rem;
}

.best-fit-card {
    background: linear-gradient(135deg, #40798c 0%, #70a9a1 100%);
    border-radius: 4px;
    padding: 30px;
    color: white;
    box-shadow: none;
}

.best-fit-content {
    display: flex;
    align-items: center;
    gap: 25px;
}

.best-fit-icon {
    font-size: 64px;
    flex-shrink: 0;
}

.best-fit-details {
    flex: 1;
}

.best-fit-role {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.best-fit-reason {
    opacity: 0.95;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.best-fit-score {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.score-label {
    font-size: 1rem;
    opacity: 0.9;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.best-fit-bar {
    background: rgba(255, 255, 255, 0.3);
    height: 12px;
    border-radius: 4px;
    overflow: hidden;
}

.best-fit-fill {
    background: white;
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
    box-shadow: none;
}

/* Job Opportunities Section */
.job-opportunities-section {
    margin-bottom: 0;
}

.job-portals {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
}

.job-opportunity-card {
    background: #9ec1a3;
    border: 2px solid #70a9a1;
    border-radius: 4px;
    padding: 15px 20px;
    transition: all 0.2s ease;
}

.job-opportunity-card:hover {
    box-shadow: 0 2px 8px rgba(64, 121, 140, 0.15);
    transform: translateY(-1px);
}

.opp-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.opp-rank {
    background: #40798c;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.opp-role {
    font-size: 1.1rem;
    color: #1f363d;
    margin: 0;
}

.job-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.job-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: white;
    border: 2px solid #70a9a1;
    border-radius: 4px;
    text-decoration: none;
    color: #1f363d;
    transition: border-color 0.2s ease;
    font-size: 0.95rem;
}

.job-link:hover {
    border-color: #40798c;
}

.job-link-icon {
    font-size: 20px;
}

.job-link-name {
    flex: 1;
    font-weight: 600;
}

.job-link-arrow {
    font-size: 18px;
    opacity: 0.5;
}

/* Interview Preparation Section */
.interview-prep-section {
    margin-bottom: 0;
}

.interview-role-section {
    margin-bottom: 25px;
}

.interview-role-section:last-child {
    margin-bottom: 0;
}

.interview-header {
    margin-bottom: 20px;
}

.interview-role-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #40798c;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    box-shadow: none;
}

.role-number {
    background: rgba(255, 255, 255, 0.3);
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.role-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.interview-role {
    color: #40798c;
    font-size: 1.05rem;
}

.interview-questions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Grid layout for interview sections on larger screens */
@media (min-width: 1200px) {
    .interview-questions {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .interview-role-section {
        margin-bottom: 0;
    }
    
    .recommendation-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .interview-questions {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .interview-role-section {
        margin-bottom: 0;
    }
}

.questions-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.question-card {
    display: flex;
    gap: 12px;
    background: #9ec1a3;
    border-left: 4px solid #40798c;
    padding: 12px 16px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.question-card:hover {
    background: #70a9a1;
}

.question-number {
    background: #40798c;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.question-text {
    flex: 1;
    color: #1f363d;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Tab Navigation Bar */
.tab-navbar {
    display: flex;
    gap: 10px;
    margin: 30px 0 0 0;
    background: #cfe0c3;
    padding: 10px;
    border-radius: 4px;
    box-shadow: none;
}

.career-skills-navbar {
    margin: 30px 0 0 0;
    background: white;
    border: 2px solid #70a9a1;
}

.tab-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 4px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #40798c;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-button:hover {
    background: white;
    color: #40798c;
}

.tab-button.active {
    background: #40798c;
    color: white;
    box-shadow: none;
}

.tab-icon {
    font-size: 1.3rem;
}

.tab-text {
    font-size: 1rem;
}

/* Tab Content Wrapper */
.tab-content-wrapper {
    margin-top: 0;
    padding: 30px;
    background: #cfe0c3;
    margin-left: 0;
    margin-right: 0;
    border-radius: 4px;
}

.career-skills-wrapper {
    margin-top: 0;
    margin-bottom: 30px;
    background: white;
    padding: 30px 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .best-fit-content {
        flex-direction: column;
        text-align: center;
    }
    
    .job-links {
        grid-template-columns: 1fr;
    }
    
    .best-fit-role {
        font-size: 1.5rem;
    }
    
    .question-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tab-navbar {
        flex-direction: column;
        gap: 8px;
    }
    
    .tab-button {
        width: 100%;
    }
    
    .tab-text {
        font-size: 0.95rem;
    }
    
    .upload-card h2 {
        font-size: 1.8rem;
    }
    
    .upload-description {
        font-size: 1rem;
    }
}

@media (min-width: 1600px) {
    .main-content {
        max-width: 1600px;
    }
    
    .results-layout {
        grid-template-columns: 1fr 380px;
    }
    
    .recommendation-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .interview-questions {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   RESUME BUILDER STYLES
   ============================================ */

/* Feature Selection Section */
.feature-selection-section {
    padding: 40px 20px;
    text-align: center;
}

.feature-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #333;
}

.feature-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 40px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: block;
    width: 100%;
}

.feature-card:hover {
    border-color: #40798c;
    box-shadow: 0 8px 24px rgba(64, 121, 140, 0.15);
    transform: translateY(-5px);
}

a .feature-card {
    text-decoration: none;
    color: inherit;
}

.feature-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.feature-btn {
    background: #40798c;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.feature-btn:hover {
    background: #2d5a6b;
}

/* Resume Builder Section */
.resume-builder-section {
    padding: 20px 0;
}

.builder-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.back-btn {
    position: absolute;
    left: 0;
    top: 0;
    background: #f5f5f5;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
    text-decoration: none;
    color: #333;
    display: inline-block;
}

.back-btn:hover {
    background: #e0e0e0;
}

.builder-header h2 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: #333;
}

.builder-subtitle {
    color: #666;
    font-size: 1.1rem;
}

.builder-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* Form Styles */
.builder-form-wrapper {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
}

.resume-form {
    max-width: 100%;
}

.form-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
}

.form-section-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    font-size: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #40798c;
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Dynamic Items */
.dynamic-item {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    position: relative;
    border: 1px solid #e0e0e0;
}

.remove-item-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4757;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.3s ease;
}

.remove-item-btn:hover {
    background: #e03e4a;
}

.add-more-btn {
    background: #40798c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.add-more-btn:hover {
    background: #2d5a6b;
}

/* Template Selection */
.template-selection-wrapper {
    position: sticky;
    top: 20px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
}

.template-selection-wrapper::-webkit-scrollbar {
    width: 6px;
}

.template-selection-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.template-selection-wrapper::-webkit-scrollbar-thumb {
    background: #40798c;
    border-radius: 10px;
}

.template-selection-wrapper::-webkit-scrollbar-thumb:hover {
    background: #2d5a6b;
}

.template-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.template-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.template-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.template-card:hover {
    border-color: #40798c;
    box-shadow: 0 4px 12px rgba(64, 121, 140, 0.1);
}

.template-card.active {
    border-color: #40798c;
    background: #f0f7f9;
}

.template-card.active .template-check {
    display: flex;
}

.template-preview {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 12px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-template {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

/* Template Previews */
.modern-preview {
    display: grid;
    grid-template-columns: 35% 1fr;
    gap: 8px;
}

.preview-sidebar {
    background: #40798c;
    border-radius: 3px;
}

.preview-content {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-line {
    height: 6px;
    background: #e0e0e0;
    border-radius: 2px;
}

.preview-line.short {
    width: 60%;
}

.professional-preview {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-header {
    height: 20px;
    background: #333;
    border-radius: 2px;
    margin-bottom: 4px;
}

.creative-preview {
    padding: 8px;
}

.preview-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    height: 100%;
}

.preview-col {
    background: linear-gradient(135deg, #40798c 0%, #70a9b3 100%);
    border-radius: 3px;
}

.template-card h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #333;
}

.template-card p {
    font-size: 0.85rem;
    color: #666;
}

.template-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: #40798c;
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
}

.generate-btn {
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Responsive Design for Resume Builder */
@media (max-width: 1200px) {
    .builder-container {
        grid-template-columns: 1fr;
    }
    
    .template-selection-wrapper {
        position: static;
    }
    
    .template-cards {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .template-card {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .feature-cards {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .builder-header h2 {
        font-size: 1.8rem;
        margin-top: 50px;
    }
    
    .back-btn {
        position: static;
        margin-bottom: 20px;
        display: inline-block;
    }
    
    .template-cards {
        flex-direction: column;
    }
}
