* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f0f2f5;
    color: #333;
    line-height: 1.5;
    padding: 20px;
    min-height: 100vh;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

header {
    background: #2c3e50;
    color: white;
    padding: 15px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.container {
    display: flex;
    min-height: 85vh;
}

/* Sidebar Styles */
.sidebar {
    width: 350px;
    background: #f8f9fa;
    padding: 20px;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
}

.section-title {
    margin: 20px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #333;
    color: #333;
    font-weight: 600;
    font-size: 1.2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
}

.btn-outline {
    background: transparent;
    border: 1px solid #2c3e50;
    color: #2c3e50;
}

.optional-section {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    border-left: 3px solid #555;
    margin-bottom: 15px;
}

.remove-btn {
    margin-top: 10px;
    background: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

/* Preview Styles */
.preview-container {
    flex: 1;
    padding: 20px;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.preview-header {
    width: 100%;
    max-width: 794px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.preview-title {
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
}

.resume-preview {
    width: 100%;
    max-width: 794px;
    background: white;
    padding: 25px;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 1123px; /* A4 height */
    position: relative;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
}

.name-container {
    flex: 1;
}

.name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #000;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    margin-top: 5px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #000;
    text-decoration: none;
    font-size: 14px;
}

/* Section Styles */
.section {
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.section-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 3px;
    border-bottom: 1px solid #000;
    color: #000;
}

.education-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
}

.education-table td {
    padding: 4px 0;
    vertical-align: top;
}

.education-table tr:first-child td {
    padding-top: 0;
}

.education-degree {
    font-weight: 600;
    font-size: 15px;
}

.education-details {
    font-size: 14px;
    color: #555;
}

.education-date {
    text-align: right;
    font-weight: 500;
    font-size: 14px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.item-title {
    font-size: 15px;
    font-weight: 600;
    color: #000;
}

.item-subtitle {
    color: #555;
    font-style: italic;
    font-size: 14px;
}

.item-date {
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.item-description {
    margin-top: 3px;
    line-height: 1.5;
    font-size: 14px;
}

.project-link, .certification-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1155cc;
    text-decoration: none;
    margin-top: 3px;
    font-weight: 500;
    font-size: 14px;
}

.skills-list {
    font-style: italic;
    margin-top: 8px;
    font-size: 15px;
    color: #444;
    line-height: 1.6;
}

.floating-download {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2c3e50;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 12px;
    background: #eee;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
}

.tab-btn.active {
    background: #2c3e50;
    color: white;
}

.tab-content {
    display: none;
}

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

.note {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    border-left: 3px solid #888;
    font-size: 14px;
}

/* Compact styles for one-page resume */
.compact-resume {
    padding: 20px;
}

.compact-resume .name {
    font-size: 24px;
}

.compact-resume .section-header {
    font-size: 16px;
}

.compact-resume .item-title {
    font-size: 14px;
}

.compact-resume .item-date {
    font-size: 13px;
}

.compact-resume .item-description {
    font-size: 13px;
}

.compact-resume .skills-list {
    font-size: 14px;
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .resume-preview {
        min-height: auto;
        padding: 15px;
    }
    
    .resume-header {
        flex-direction: column;
    }
    
    .social-links {
        flex-direction: row;
        margin-top: 10px;
        margin-bottom: 5px;
    }
}