/* Modern Model Application Form CSS */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --card-bg: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-radius: 16px;
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --backdrop-blur: blur(20px);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

/* Force visibility for all form inputs */
input[type="text"], input[type="email"], input[type="tel"], 
input[type="number"], textarea, select, 
.form-input, .form-textarea, .date-select {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, 
input[type="number"]:focus, textarea:focus, select:focus {
    background: rgba(255, 255, 255, 1) !important;
    color: #333 !important;
}

/* Special handling for birth date selects */
select[name="birth_day"], select[name="birth_month"], select[name="birth_year"],
.date-select {
    background: #ffffff !important;
    color: #333333 !important;
    border: 2px solid #ddd !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
    font-weight: bold !important;
}

select[name="birth_day"]:focus, select[name="birth_month"]:focus, select[name="birth_year"]:focus,
.date-select:focus {
    background: rgba(255, 255, 255, 1) !important;
    color: #333 !important;
}

/* Force option visibility for birth date selects */
select[name="birth_day"] option, select[name="birth_month"] option, select[name="birth_year"] option,
.date-select option {
    background: #ffffff !important;
    color: #333333 !important;
    padding: 8px !important;
}

select[name="birth_day"] option:hover, select[name="birth_month"] option:hover, select[name="birth_year"] option:hover,
.date-select option:hover {
    background: #f0f0f0 !important;
    color: #000 !important;
}

select[name="birth_day"] option:selected, select[name="birth_month"] option:selected, select[name="birth_year"] option:selected,
.date-select option:selected {
    background: #667eea !important;
    color: #ffffff !important;
}

/* Simple fix - solid colors only */
#birth_day, #birth_month, #birth_year {
    background-color: white !important;
    background: white !important;
    color: black !important;
    border: 2px solid #999 !important;
    font-size: 16px !important;
    font-weight: normal !important;
    -webkit-appearance: menulist !important;
}

#birth_day option, #birth_month option, #birth_year option {
    background-color: white !important;
    background: white !important;
    color: black !important;
}

select option {
    background-color: white !important;
    color: black !important;
}

/* Disabled form fields */
.form-input:disabled, .form-input.disabled {
    background-color: #f5f5f5 !important;
    color: #999 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Ensure selected value is always visible */
#birth_day:focus, #birth_month:focus, #birth_year:focus {
    background-color: white !important;
    background: white !important;
    color: black !important;
}

#birth_day:not(:focus), #birth_month:not(:focus), #birth_year:not(:focus) {
    background-color: white !important;
    background: white !important;
    color: black !important;
}

.modern-model-form {
    max-width: 900px;
    margin: 0 auto;
    background: var(--dark-gradient);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow);
    backdrop-filter: var(--backdrop-blur);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.form-header {
    text-align: center;
    margin-bottom: 50px;
}

.form-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.form-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Form Sections */
.form-section {
    margin-bottom: 60px;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}

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

.section-number {
    background: var(--primary-gradient);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex-grow: 1;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    margin-top: 8px;
}

/* Personal Info Grid - Organized Layout */
.personal-info-grid {
    display: block !important;
    width: 100% !important;
    margin-bottom: 30px;
}

.form-row {
    display: block !important;
    width: 100% !important;
    margin-bottom: 20px !important;
    overflow: hidden !important;
}

.form-row .form-group {
    float: left !important;
    width: 48% !important;
    margin-right: 2% !important;
    box-sizing: border-box !important;
}

.form-row .form-group:last-child {
    margin-right: 0 !important;
}
    align-items: end;
}

.form-row.birth-date-row {
    grid-template-columns: 1fr;
}

.form-row:last-child {
    grid-template-columns: 2fr 1fr 1fr;
}

.birth-date-group {
    width: 100%;
}

/* Form Grid (for other sections) */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.small {
    min-width: 120px;
}

.form-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input, .form-textarea {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    color: #333 !important;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: var(--backdrop-blur);
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder, .form-textarea::placeholder {
    color: #666 !important;
}

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

/* Birth Date Section */
.birth-date-section {
    margin-bottom: 30px;
}

.date-inputs {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.date-select {
    flex: 1;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 16px;
    color: #333 !important;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 1) !important;
    color: #333 !important;
}

.date-select option {
    background: white !important;
    color: #333 !important;
    padding: 8px;
}

/* Accept All Categories Section */
.accept-all-section {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 24px;
    margin: 20px 0 30px 0;
}

.accept-all-checkbox {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.accept-all-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-top: 2px;
    accent-color: #667eea;
}

.accept-all-text {
    color: var(--text-secondary);
    line-height: 1.6;
    cursor: pointer;
}

.accept-all-text strong {
    color: var(--text-primary);
}

/* Modern Category Cards - TABLE LAYOUT FORCE */
.modern-categories-grid {
    display: block !important;
    width: 100% !important;
    margin-top: 30px !important;
}

.modern-categories-grid::after {
    content: "";
    display: table;
    clear: both;
}

.modern-categories-grid .modern-category-card {
    float: left !important;
    width: 48% !important;
    margin-right: 2% !important;
    margin-bottom: 20px !important;
    box-sizing: border-box !important;
}

.modern-categories-grid .modern-category-card:nth-child(even) {
    margin-right: 0 !important;
}

.modern-category-card {
    position: relative;
    background: var(--card-bg);
    width: 100%;
    min-height: 200px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    cursor: pointer;
    backdrop-filter: var(--backdrop-blur);
}

.modern-category-card:hover {
    transform: translateY(-8px);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
}

.modern-category-card:hover .card-glow {
    opacity: 1;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.card-inner {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: var(--backdrop-blur);
    padding: 24px;
    height: 100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

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

.category-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.info-modal-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: var(--backdrop-blur);
}

.info-modal-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
    transform: scale(1.1);
}

.info-icon {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
}

.card-body {
    flex-grow: 1;
    margin-bottom: 20px;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.category-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 16px 0;
}

.category-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 500;
}

.card-footer {
    margin-top: auto;
}

.modern-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.modern-checkbox:hover {
    background: rgba(102, 126, 234, 0.1);
}

.modern-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-mark {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: transparent;
    font-size: 1rem;
    font-weight: 700;
}

.modern-checkbox input[type="checkbox"]:checked + .checkbox-mark {
    background: var(--primary-gradient);
    border-color: #667eea;
    color: white;
}

.modern-checkbox input[type="checkbox"]:checked + .checkbox-mark + .checkbox-label {
    color: #667eea;
    font-weight: 600;
}

.checkbox-label {
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

.modern-category-card.selected .selection-overlay {
    opacity: 1;
}

/* Accept All Categories Special Styling */
.accept-all-card {
    border: 2px solid rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
}

.accept-all-card:hover {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.15);
}

.accept-all-card .card-glow {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
}

.all-categories-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #333;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Media Upload Container */
.media-upload-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.media-row {
    display: block !important;
    width: 100% !important;
}

.photos-group {
    width: 100% !important;
    margin-bottom: 30px !important;
    box-sizing: border-box !important;
}

.videos-group {
    width: 100% !important;
    box-sizing: border-box !important;
}

.media-group {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.media-group-header {
    margin-bottom: 16px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

.media-group-title {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.media-group-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.photo-upload-grid {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
}

.photo-upload-grid .upload-box {
    float: left !important;
    width: 31% !important;
    margin-right: 3% !important;
    margin-bottom: 12px !important;
    box-sizing: border-box !important;
}

.photo-upload-grid .upload-box:nth-child(3n) {
    margin-right: 0 !important;
}

.video-upload-grid {
    display: block !important;
    width: 100% !important;
}

.video-upload-grid .upload-box {
    width: 100% !important;
    margin-bottom: 12px !important;
    box-sizing: border-box !important;
    height: 120px !important;
    min-height: 120px !important;
}

.video-upload-grid .upload-icon {
    font-size: 2rem !important;
}

.video-upload-grid .upload-label {
    font-size: 0.9rem !important;
}

.video-upload-grid .upload-optional {
    font-size: 0.8rem !important;
}

/* Individual Upload Boxes */
.individual-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.upload-box {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-box:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.upload-box.has-file {
    border-style: solid;
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.1);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-box .upload-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    margin-bottom: 8px;
}

.upload-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-required {
    font-size: 0.8rem;
    color: #ef4444;
    font-weight: 500;
}

.upload-optional {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.individual-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-box .file-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: calc(var(--border-radius) - 2px);
    overflow: hidden;
    display: none;
}

.upload-box.has-file .file-preview {
    display: block;
}

.upload-box.has-file .upload-placeholder {
    display: none;
}

.upload-box .file-preview img,
.upload-box .file-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-file-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.remove-file-btn:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.1);
}

/* Upload Section (Legacy - keeping for compatibility) */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.upload-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-subtext {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.upload-btn {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.file-input {
    display: none;
}

.file-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.file-item {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
}

.file-item img,
.file-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.file-remove:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

/* Consent Section */
.consent-section {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 30px;
}

.consent-checkbox {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.consent-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-top: 2px;
    accent-color: #667eea;
}

.consent-text {
    color: var(--text-secondary);
    line-height: 1.6;
    cursor: pointer;
}

.consent-text strong {
    color: var(--text-primary);
}

/* Submit Section */
.submit-section {
    text-align: center;
}

.submit-btn {
    background: var(--primary-gradient);
    border: none;
    border-radius: 16px;
    padding: 20px 50px;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.submit-btn.loading .btn-text {
    display: none;
}

.submit-btn.loading .btn-loader {
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modern Modal */
.modern-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-container {
    position: relative;
    z-index: 10001;
    width: 90%;
    max-width: 600px;
    animation: modalSlideIn 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.modal-content {
    background: var(--dark-gradient);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    background: var(--primary-gradient);
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    padding-right: 20px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.close-icon {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-body {
    padding: 32px;
}

.modal-body p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.1rem;
    margin: 0;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-model-form {
        padding: 24px;
        margin: 16px;
    }
    
    .form-title {
        font-size: 2rem;
    }
    
    .modern-categories-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Personal Info Mobile Layout */
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-row:last-child {
        grid-template-columns: 1fr;
    }
    
    /* Categories Mobile Layout */
    .modern-categories-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 400px;
    }
    
    /* Media Row Mobile Layout */
    .media-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .photos-group,
    .videos-group {
        flex: 1;
    }
    
    /* Upload Boxes Mobile */
    .photo-upload-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .video-upload-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .media-group {
        padding: 16px;
    }
    
    .individual-upload-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .section-number {
        margin: 0 auto;
    }
    
    .date-inputs {
        flex-direction: column;
        gap: 12px;
    }
    
    .modal-container {
        width: 95%;
    }
    
    .modal-header {
        padding: 20px 24px;
    }
    
    .modal-body {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .modern-model-form {
        padding: 16px;
        margin: 8px;
    }
    
    .form-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    /* Personal Info on Small Screens */
    .personal-info-grid {
        gap: 16px;
    }
    
    .form-row {
        gap: 12px;
    }
    
    .date-inputs {
        gap: 8px;
    }
    
    .date-select {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .card-inner {
        padding: 20px;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .submit-btn {
        width: 100%;
        padding: 18px;
    }
    
    /* Upload Boxes Small Mobile */
    .photo-upload-grid,
    .video-upload-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .individual-upload-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .upload-box {
        aspect-ratio: 4/3;
        padding: 16px;
    }
    
    .upload-box .upload-icon {
        font-size: 2rem;
        margin-bottom: 4px;
    }
    
    .upload-label {
        font-size: 0.9rem;
    }
    
    .media-group {
        padding: 12px;
    }
    
    .media-group-title {
        font-size: 1.2rem;
    }
}

/* Loading States */
.form-section.loading {
    opacity: 0.6;
    pointer-events: none;
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    margin: 8px 0;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Alert Styles */
.alert {
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 12px;
    font-weight: 500;
    animation: alertSlideIn 0.3s ease;
}

.alert-success {
    background: rgba(34, 197, 94, 0.2);
    border: 2px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus States */
.modern-category-card:focus-within {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.info-modal-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3);
}

.submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3), 0 8px 24px rgba(102, 126, 234, 0.3);
}