* {
    box-sizing: border-box;
}

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

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-top: 0;
}

.title-section {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
}

textarea.comment-field {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 80px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

textarea.comment-field:focus {
    outline: none;
    border-color: #3498db;
}

.upload-section {
    margin-bottom: 25px;
    text-align: center;
}

.upload-label {
    display: inline-block;
    padding: 12px 24px;
    background: #3498db;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    font-weight: bold;
}

.upload-label:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.upload-label:active {
    transform: translateY(0);
}

#photo-upload {
    display: none;
}

.clear-button {
    display: inline-block;
    margin-left: 15px;
    padding: 10px 18px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    font-weight: bold;
}

.clear-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.clear-button:active {
    transform: translateY(0);
}

.status-message {
    padding: 12px;
    margin: 15px 0;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.preview-section h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center;
}

.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.photo-preview-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.photo-preview-item.dragging {
    opacity: 0.7;
    transform: scale(1.05);
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.photo-preview-item.drag-over {
    border: 2px dashed #3498db;
    background: #f0f8ff;
    transform: scale(1.02);
}

.preview-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 0 auto 10px;
    max-height: 200px;
    object-fit: contain;
}

.preview-caption {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    word-break: break-all;
}

.comment-field {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 80px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.comment-field:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.error-icon {
    font-size: 28px;
    text-align: center;
    margin: 15px 0;
    color: #e74c3c;
}

.controls {
    text-align: center;
    margin-top: 20px;
}

#generate-pdf {
    padding: 12px 30px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
}

#generate-pdf:hover:not(.disabled) {
    background: #219955;
    transform: translateY(-2px);
}

#generate-pdf.disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

#generate-pdf.disabled:hover {
    background: #95a5a6;
    transform: none;
}

#download-link {
    display: inline-block;
    margin-left: 20px;
    padding: 12px 20px;
    background: #9b59b6;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

#download-link:hover {
    background: #8e44ad;
}

.hidden {
    display: none !important;
}

/* Адаптивность для мобильных устройств */
@media (max-width:
