body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    width: 80%;
    max-width: 800px;
    margin: auto;
    overflow: hidden;
    padding: 20px;
}

h1 {
    color: #333;
    text-align: center;
}

form {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

input, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

textarea {
    height: 100px;
}

button {
    display: block;
    width: 100%;
    padding: 10px;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    margin-bottom: 10px;
}

button:hover {
    background: #555;
}

.work-experience, .education-entry {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 3px;
}

#addWorkExperience, #addEducation {
    background: #4CAF50;
}

#addWorkExperience:hover, #addEducation:hover {
    background: #45a049;
}

#resumeOutput {
    background: #fff;
    padding: 20px;
}

.hidden {
    display: none;
}

.delete-entry {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    margin-top: 10px;
    cursor: pointer;
    border-radius: 3px;
    width: auto;
}

.delete-entry:hover {
    background-color: #d32f2f;
}

.work-experience .delete-entry, .education-entry .delete-entry {
    position: static;
    margin-top: 10px;
}

h2 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
}

input::placeholder, textarea::placeholder {
    color: #999;
    font-style: italic;
    font-size: 0.9em;
}

.certification-entry {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 3px;
}

button[type="submit"] {
    background-color: #20B2AA;
    color: white;
    font-weight: bold;
    font-size: 1.1em;
    padding: 12px;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #1A8F89;
}

#generatePDF {
    background-color: #20B2AA;
}

#generatePDF:hover {
    background-color: #1A8F89;
}

footer {
    text-align: center;
    padding: 15px 0;
    font-size: 0.5em;
    color: #666;
    max-width: 60%;
    margin: 0 auto;
}

footer p {
    margin: 0;
    line-height: 1.5;
}

.header-section {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.photo-upload {
    flex: 0 0 150px;
}

.photo-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ddd;
    margin-bottom: 10px;
}

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

.personal-info {
    flex: 1;
    padding-top: 10px;
}

#photoInput {
    width: 150px;
}

/* Drag and Drop Styles */
.section-reorder-info {
    background-color: #e8f5e8;
    border: 1px solid #4CAF50;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.section-reorder-info p {
    margin: 0;
    color: #2d5d2d;
    font-size: 0.9em;
}

.draggable-sections {
    min-height: 50px;
}

.resume-section {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    cursor: grab;
}

.resume-section:hover {
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.resume-section.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    cursor: grabbing;
    border-color: #4CAF50;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.resume-section.drag-over {
    border-color: #4CAF50;
    background-color: #f8fff8;
    border-style: dashed;
}

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

.section-header h2 {
    margin: 0;
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
    flex-grow: 1;
}

.drag-handle {
    color: #999;
    font-size: 18px;
    cursor: grab;
    padding: 5px;
    user-select: none;
    margin-left: 10px;
}

.drag-handle:hover {
    color: #4CAF50;
}

.resume-section.dragging .drag-handle {
    cursor: grabbing;
}

/* Ensure sections maintain their internal styling */
.resume-section h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
}

.resume-section .section-header h2 {
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
    margin-bottom: 0;
}

/* Drop zone indicator */
.drop-indicator {
    height: 4px;
    background-color: #4CAF50;
    border-radius: 2px;
    margin: 5px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drop-indicator.active {
    opacity: 1;
}