/* Series Edit Advanced - Blue Theme */

.serie-edit-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.serie-poster-section {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.serie-poster {
    width: 100%;
    max-width: 300px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 1rem;
}

.serie-poster-placeholder {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.serie-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.serie-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.serie-metadata-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.serie-metadata-icon {
    color: #3498db;
    font-size: 1rem;
}

.serie-form-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.serie-form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.serie-form-label i {
    color: #3498db;
}

.serie-form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.serie-score-input {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    color: #3498db;
}

.serie-episodes-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.serie-favorite-switch {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.05), rgba(192, 57, 43, 0.05));
    border-radius: 12px;
    border: 2px solid rgba(231, 76, 60, 0.2);
}

.serie-favorite-switch input:checked ~ .form-check-label {
    color: #e74c3c;
    font-weight: 600;
}

.serie-rating-stars {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.serie-rating-star {
    font-size: 2rem;
    color: #dfe6e9;
    cursor: pointer;
    transition: all 0.2s ease;
}

.serie-rating-star:hover,
.serie-rating-star.active {
    color: #f1c40f;
    transform: scale(1.1);
}

.serie-lists-help {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-style: italic;
}

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

.serie-synopsis-section {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(41, 128, 185, 0.05));
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.serie-synopsis-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.serie-synopsis-title i {
    color: #3498db;
}

.serie-synopsis-text {
    color: #555;
    line-height: 1.6;
}

.serie-action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Select2 Customization for Blue Theme */
.select2-container--default .select2-selection--multiple {
    border-radius: 8px;
    border-color: #dee2e6;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    color: white;
    border-radius: 6px;
    padding: 4px 8px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white;
    margin-right: 5px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ecf0f1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Remove container padding for full-width on mobile */
    .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }
    
    /* Reduce padding on mobile */
    .edit-card {
        padding: 1rem !important;
        border-radius: 0 !important;
    }
    
    /* Add spacing between form fields on mobile */
    .form-control, .form-select {
        margin-bottom: 1rem !important;
    }
    
    /* Situation cards - one per line on mobile */
    .situation-radio-group {
        flex-direction: column !important;
    }
    
    .situation-radio-option {
        min-width: 100% !important;
        flex: none !important;
    }
    
    .serie-edit-header {
        padding: 1.5rem;
    }
    
    .serie-form-section {
        padding: 1.5rem;
    }
    
    .serie-title {
        font-size: 1.2rem;
    }
    
    .serie-metadata {
        flex-direction: column;
        align-items: center;
    }
    
    .serie-episodes-group {
        grid-template-columns: 1fr;
    }
    
    .serie-action-buttons {
        flex-direction: column;
    }
    
    .serie-action-buttons .btn-site {
        width: 100%;
    }
    
    /* Fix image breaking on mobile */
    .serie-info-section .col-12.text-center img,
    .serie-placeholder {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    /* Release Date - Stack label and value */
    .serie-info-card .text-end {
        text-align: left !important;
        margin-top: 1rem;
        width: 100%;
    }
    
    .serie-info-card .d-flex.align-items-center.justify-content-between {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    /* Recommendation buttons - stack vertically */
    .rating-options {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .rating-option {
        width: 100% !important;
    }
    
    .rating-option label {
        width: 100% !important;
    }
    
    /* Action buttons - stack vertically with same width */
    .d-flex.justify-content-between.align-items-center.mt-5 {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: stretch !important;
    }
    
    .d-flex.justify-content-between.align-items-center.mt-5 > * {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .d-flex.justify-content-between.align-items-center.mt-5 .btn {
        width: 100% !important;
    }
}

/* Theme-Specific Styles */

/* Light Theme */
.theme-indigo-light .edit-card {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
}

.theme-indigo-light .serie-info-section {
    border-bottom: 2px solid #e9ecef !important;
}

.theme-indigo-light .serie-info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.theme-indigo-light .serie-info-card h4,
.theme-indigo-light .serie-info-card .fw-semibold {
    color: #212529 !important;
}

.theme-indigo-light .serie-info-card .text-muted {
    color: #6c757d !important;
}

.theme-indigo-light .serie-info-card p.text-muted {
    color: #6c757d !important;
}

.theme-indigo-light #platformTrackingSection .platform-row:hover {
    background: #f0f0f0 !important;
}

.theme-indigo-light #currentCoverPreview {
    border-color: #dee2e6;
    background: #f8f9fa;
}

.theme-indigo-light .gallery-item {
    background: #fff;
}

/* Dark Theme */
.theme-indigo-dark .edit-card {
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.theme-indigo-dark .serie-info-section {
    border-bottom: 2px solid rgba(139, 92, 246, 0.3) !important;
}

.theme-indigo-dark .serie-info-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(30, 41, 59, 0.8) 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.theme-indigo-dark .serie-info-card h4,
.theme-indigo-dark .serie-info-card .fw-semibold {
    color: #e2e8f0 !important;
}

.theme-indigo-dark .serie-info-card .text-muted {
    color: #94a3b8 !important;
}

.theme-indigo-dark .serie-info-card p.text-muted {
    color: #cbd5e1 !important;
}

.theme-indigo-dark #platformTrackingSection .platform-row {
    background: rgba(30, 41, 59, 0.4) !important;
}

.theme-indigo-dark #platformTrackingSection .platform-row:hover {
    background: rgba(139, 92, 246, 0.15) !important;
}

.theme-indigo-dark #currentCoverPreview {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(30, 41, 59, 0.6);
}

.theme-indigo-dark .gallery-item {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.theme-indigo-dark .upload-progress {
    background: rgba(30, 41, 59, 0.6) !important;
}

.theme-indigo-dark .upload-progress-bar {
    background: rgba(139, 92, 246, 0.2);
}

/* Light Theme */
.theme-indigo-light .situation-card {
    background: white !important;
}

/* Form Elements Dark Theme */
.theme-indigo-dark .situation-card {
    background: rgba(30, 41, 59, 0.6) !important;
    border: 2px solid rgba(139, 92, 246, 0.4) !important;
}

.theme-indigo-dark .situation-radio-option input[type="radio"]:checked + .situation-card {
    background: rgba(139, 92, 246, 0.2) !important;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.3);
}

.theme-indigo-dark .form-label,
.theme-indigo-dark .section-title {
    color: #e2e8f0 !important;
}

.theme-indigo-dark .text-dark {
    color: #e2e8f0 !important;
}

.theme-indigo-dark .form-select,
.theme-indigo-dark .form-control {
    background-color: rgba(30, 41, 59, 0.8) !important;
    color: #e2e8f0 !important;
    border-color: rgba(139, 92, 246, 0.3);
}

.theme-indigo-dark .form-select:focus,
.theme-indigo-dark .form-control:focus {
    background-color: rgba(30, 41, 59, 0.9) !important;
    border-color: rgba(139, 92, 246, 0.6);
    color: #e2e8f0 !important;
}

.theme-indigo-dark .form-control:disabled,
.theme-indigo-dark .form-control[readonly] {
    background-color: rgba(30, 41, 59, 0.6) !important;
    color: #94a3b8 !important;
}

.theme-indigo-dark .form-select option {
    background-color: #1e293b;
    color: #e2e8f0;
}

.theme-indigo-dark #score {
    color: #e2e8f0 !important;
}

.theme-indigo-dark .text-muted {
    color: #94a3b8 !important;
}

.theme-indigo-dark .favorite-section {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 193, 7, 0.15)) !important;
}

.theme-indigo-dark .favorite-section:hover {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.25), rgba(255, 193, 7, 0.25)) !important;
}

/* Select2 Dark Theme Styles */
.theme-indigo-dark .select2-container--default .select2-selection--multiple {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}

.theme-indigo-dark .select2-container--default .select2-selection--multiple .select2-search__field {
    color: #e2e8f0 !important;
}

.theme-indigo-dark .select2-container--default .select2-selection--multiple .select2-search__field::placeholder {
    color: #94a3b8 !important;
}

.theme-indigo-dark .select2-dropdown {
    background-color: #1e293b !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}

.theme-indigo-dark .select2-results__option {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
}

.theme-indigo-dark .select2-results__option--highlighted {
    background-color: rgba(139, 92, 246, 0.3) !important;
}

.theme-indigo-dark .select2-results__option--selected {
    background-color: rgba(139, 92, 246, 0.2) !important;
}

.theme-indigo-dark .select2-search--dropdown .select2-search__field {
    background-color: rgba(30, 41, 59, 0.9) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    color: #e2e8f0 !important;
}

/* Serie Progress Information Display */
.serie-progress-info {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.serie-progress-info h5 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(5px);
}

.stat-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.stat-text {
    color: var(--text-primary);
    font-size: 0.95rem;
    flex: 1;
}

.stat-estimated {
    border: 1px dashed rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.03);
}

/* Season Tracking Section */
.season-tracking-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.season-row {
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.season-row:hover {
    transform: translateY(-2px);
}

.season-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 0 0 auto;
}

.season-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.season-number {
    font-weight: 700;
    font-size: 1.1rem;
}

.badge-airing {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.season-episodes-info {
    font-size: 0.9rem;
}

.season-input-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex: 1 1 auto;
}

.season-input-group label {
    font-weight: 600;
    margin-bottom: 0;
    white-space: nowrap;
}

.season-episode-input {
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    transition: border-color 0.3s ease;
    text-align: center;
}

.season-max-episodes {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

.check-all-container {
    padding: 1rem;
    border-radius: 12px;
    border: 2px dashed;
}

.season-badge-container {
    flex: 0 0 auto;
    margin-left: auto;
}

.season-complete-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .season-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    .stat-text {
        font-size: 0.85rem;
    }
    
    .season-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .season-input-group {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .season-input-group .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        width: 100%;
    }
    
    .season-episode-input {
        max-width: 100% !important;
    }
}
