/* Admin Form Modern Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
}

.admin-wrapper {
    min-height: 100vh;
    background: #f5f7fa;
}

body.modal-mode .admin-wrapper {
    min-height: auto;
    background: transparent;
}

.admin-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
    background: #ffffff;
    min-height: 100vh;
}

body.modal-mode .admin-container {
    max-width: 100%;
    margin: 0;
    min-height: auto;
    border-radius: 0;
}

/* Header */
.admin-header {
    background: #0f6cbf;
    padding: 20px 32px;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body.modal-mode .admin-header {
    position: relative;
    border-radius: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-title {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.admin-title i {
    font-size: 1.8rem;
}

.btn-close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.btn-close-modal:not([style*="display: none"]) {
    display: flex !important;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Form */
.admin-form {
    padding: 32px;
}

.form-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #0f6cbf;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.section-title-group {
    flex: 1;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group label i {
    color: #0f6cbf;
    font-size: 0.9rem;
}

.required {
    color: #ef4444;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #ffffff;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0f6cbf;
    box-shadow: 0 0 0 3px rgba(15, 108, 191, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.help-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 6px;
}

.help-text i {
    font-size: 0.8rem;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 48px 24px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: #0f6cbf;
    background: #e7f3ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(15, 108, 191, 0.1);
}

.file-upload-area.dragover {
    border-color: #0f6cbf;
    background: #e7f3ff;
    border-style: solid;
    transform: scale(1.02);
}

.file-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    margin-bottom: 16px;
}

.upload-icon i {
    font-size: 4rem;
    color: #0f6cbf;
    opacity: 0.8;
}

.upload-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.upload-content p {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.upload-link {
    color: #0f6cbf;
    font-weight: 600;
    text-decoration: underline;
}

.upload-formats {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 8px;
}

.file-info {
    margin-top: 16px;
    padding: 12px 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    display: none;
}

.file-info.show {
    display: block;
}

.file-info strong {
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.file-info small {
    color: #047857;
    font-size: 0.85rem;
}

.video-preview {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    margin-top: 16px;
    background: #000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.video-preview.show {
    display: block;
}

/* Timeline Editor */
.timeline-container {
    margin-bottom: 16px;
}

.timeline-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.timeline-item:hover {
    border-color: #0f6cbf;
    box-shadow: 0 2px 8px rgba(15, 108, 191, 0.1);
}

.timeline-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.timeline-item-number {
    font-weight: 700;
    color: #0f6cbf;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-item-number::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #0f6cbf;
    border-radius: 50%;
}

.btn-remove-timeline {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-remove-timeline:hover {
    background: #fecaca;
    transform: scale(1.05);
}

.timeline-time-input {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.timeline-time-input label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.timeline-time-input input {
    width: 100px;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.timeline-time-input input:focus {
    outline: none;
    border-color: #0f6cbf;
    box-shadow: 0 0 0 3px rgba(15, 108, 191, 0.1);
}

.btn-capture-time {
    background: #06b6d4;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-capture-time:hover {
    background: #0891b2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(6, 182, 212, 0.3);
}

.timeline-item .form-group {
    margin-bottom: 16px;
}

.timeline-item .form-group:last-child {
    margin-bottom: 0;
}

.btn-add-timeline {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

.btn-add-timeline:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 24px;
    border-top: 2px solid #f3f4f6;
    margin-top: 32px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #0f6cbf;
    color: white;
}

.btn-primary:hover {
    background: #0d5aa7;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(15, 108, 191, 0.2);
}

.btn-secondary {
    background: #ffffff;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-container {
        padding: 0;
    }
    
    .admin-header {
        padding: 20px;
    }
    
    .admin-title {
        font-size: 1.25rem;
    }
    
    .admin-form {
        padding: 20px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/* Modal Mode Adjustments */
body.modal-mode .admin-wrapper {
    background: transparent;
    padding: 0;
}

body.modal-mode .admin-container {
    min-height: auto;
    border-radius: 0;
    box-shadow: none;
}

body.modal-mode .admin-header {
    border-radius: 0;
    margin: 0;
}

