/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 2rem;
    background-color: #007bff;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    width: 60px;
    height: auto;
}

.site-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: #007bff;
}

/* Main Content Styles */
.main-content {
    padding: 2rem 0;
}

/* Form Styles */
.cv-form {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Photo Upload Section */
.photo-upload-section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
}

.photo-upload-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.image-area {
    width: 150px;
    height: 150px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    overflow: hidden;
    position: relative;
}

.image-area.has-image {
    border: 2px solid #ddd;
    background-color: transparent;
}

.image-area img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #fff;
}

.image-placeholder {
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
}

.photo-upload-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
}

.photo-upload-text {
    font-size: 0.95rem;
    color: #2c3e50;
    font-weight: 500;
}

.add-image-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    align-self: flex-start;
    transition: background-color 0.3s ease;
}

.add-image-btn:hover {
    background-color: #0056b3;
}

#imageUpload {
    display: none;
}

.form-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    flex: 1 1 100%;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group input:required:invalid {
    border-color: #dc3545;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Generate PDF Button */
.generate-section {
    text-align: center;
    margin: 2rem 0;
}

.generate-btn {
    background-color: #28a745;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.generate-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Preview and Download Section */
.preview-download-section {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    margin-top: 2rem;
}

.preview-container {
    flex: 2;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.preview-header {
    background-color: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-icon {
    font-size: 1.2rem;
}

.preview-text {
    font-weight: bold;
    color: #2c3e50;
}

.preview-screen {
    height: 400px;
    padding: 2rem;
    background-color: #fff;
    overflow-y: auto;
}

.preview-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-style: italic;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
}

.download-btn {
    flex: 1;
    background-color: #007bff;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 400px;
}

.download-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.download-icon {
    font-size: 2rem;
}

/* Error styles */
.error {
    border-color: #dc3545 !important;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .photo-upload-container {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .preview-download-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .download-btn {
        min-height: 200px;
        font-size: 1.1rem;
    }
    
    .preview-screen {
        height: 300px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .cv-form {
        padding: 1.5rem;
    }
    
    .site-name {
        font-size: 1.5rem;
    }
    
    .generate-btn {
        font-size: 1.1rem;
        padding: 12px 30px;
    }
}

@media (max-width: 480px) {
    .logo-section {
        justify-content: center;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 0.95rem;
    }
}