* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    text-align: center;
}

header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.1em;
}

/* Project List Section */
.project-list-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.section-header h2 {
    color: #333;
    font-size: 1.8em;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: white;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.project-info {
    flex: 1;
}

.project-info h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
}

.project-meta {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.project-date {
    font-size: 0.85em;
    opacity: 0.8;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background 0.3s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-body label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: bold;
}

.input-text {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.input-text:focus {
    outline: none;
    border-color: #667eea;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Project Detail Section */
.project-detail-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.upload-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.upload-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 2px dashed #ddd;
}

.upload-box h3 {
    color: #333;
    margin-bottom: 10px;
}

.upload-box p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.file-input {
    display: none;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.file-label:hover {
    transform: scale(1.05);
}

.file-icon {
    font-size: 1.5em;
}

.file-preview {
    margin-top: 15px;
}

.file-list {
    background: white;
    padding: 15px;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    padding: 8px;
    background: #f8f9fa;
    margin-bottom: 5px;
    border-radius: 5px;
    font-size: 0.9em;
}

/* Settings Section */
.settings-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.settings-section h3 {
    color: #333;
    margin-bottom: 15px;
}

.settings-grid {
    display: grid;
    gap: 15px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    color: #333;
    font-weight: bold;
}

.setting-item input[type="number"] {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.setting-item small {
    color: #666;
    font-size: 0.85em;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: transform 0.3s;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: transform 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-danger:hover {
    transform: translateY(-2px);
    background: #c82333;
}

.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(17, 153, 142, 0.4);
}

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

.btn-icon {
    font-size: 1.3em;
}

/* Jobs Section */
.jobs-section {
    margin-top: 30px;
}

.jobs-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.jobs-list {
    display: grid;
    gap: 20px;
}

.job-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #667eea;
}

.job-card.status-completed {
    border-left-color: #28a745;
}

.job-card.status-error {
    border-left-color: #dc3545;
}

.job-card.status-processing {
    border-left-color: #ffc107;
}

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

.job-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-icon {
    font-size: 1.5em;
}

.status-text {
    font-weight: bold;
    color: #333;
}

.job-date {
    color: #666;
    font-size: 0.9em;
}

/* Job Progress Section */
.job-progress-section {
    margin-top: 15px;
}

.job-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-step {
    color: #333;
    font-weight: bold;
}

.progress-percent {
    color: #667eea;
    font-weight: bold;
    font-size: 1.1em;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
}

/* Job Details */
.job-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    color: #666;
    font-size: 0.85em;
    font-weight: bold;
}

.detail-value {
    color: #333;
    font-size: 1em;
    font-weight: bold;
}

/* Job Log */
.job-log {
    background: white;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #333;
    max-height: 150px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.job-result {
    margin-top: 15px;
}

.job-filename {
    color: #333;
    font-weight: bold;
    margin-bottom: 5px;
}

.job-size {
    color: #666;
    margin-bottom: 15px;
}

.job-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.job-error {
    margin-top: 15px;
    padding: 15px;
    background: #f8d7da;
    border-radius: 8px;
    color: #721c24;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 1.1em;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    padding: 20px;
    font-size: 0.9em;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    border-left: 5px solid #28a745;
}

.notification-error {
    border-left: 5px solid #dc3545;
}

.notification-info {
    border-left: 5px solid #17a2b8;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .upload-section {
        grid-template-columns: 1fr;
    }
    
    .job-actions {
        flex-direction: column;
    }
    
    .notification {
        right: 10px;
        left: 10px;
    }
}