/* Style for situation select options */
#situationId option {
    padding: 10px;
    font-weight: 600;
}

/* Style for score select options */
#score option {
    padding: 10px;
    font-weight: 600;
}

/* Score badge styles - Moved to theme files */

.form-section {
    transition: all 0.3s ease;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.rating-option label {
    transition: all 0.3s ease;
    cursor: pointer;
}

.rating-option input:checked + label {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.rating-option label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-check:checked + .btn-outline-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-check:checked + .btn-outline-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-check:checked + .btn-outline-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.edit-card {
    animation: fadeInUp 0.6s ease;
}

/* @keyframes fadeInUp - Moved to theme files */

.favorite-section {
    cursor: pointer;
}

.favorite-section:hover {
    transform: scale(1.01);
}

/* Tabs Styling */
#gameEditTabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 24px;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s;
    background: transparent;
}

#gameEditTabs .nav-link:hover {
    color: #667eea;
    border-bottom-color: rgba(102, 126, 234, 0.3);
}

#gameEditTabs .nav-link.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: transparent;
}

/* Cover Upload Area */
#coverUploadArea {
    border: 2px dashed #667eea;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    transition: all 0.3s;
}

#coverUploadArea:hover {
    border-color: #764ba2;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transform: translateY(-2px);
}

#coverUploadArea.dragover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    transform: scale(1.02);
}

/* Gallery Upload Area */
#galleryUploadArea {
    border: 2px dashed #4ecdc4;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.05), rgba(102, 126, 234, 0.05));
    transition: all 0.3s;
}

#galleryUploadArea:hover {
    border-color: #44a3d5;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(102, 126, 234, 0.1));
    transform: translateY(-2px);
}

#galleryUploadArea.dragover {
    border-color: #4ecdc4;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), rgba(102, 126, 234, 0.15));
    transform: scale(1.02);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    background: #fff;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-actions {
    display: flex;
    gap: 10px;
}

.gallery-item-actions button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item-actions .btn-view {
    background: #667eea;
}

.gallery-item-actions .btn-view:hover {
    background: #764ba2;
    transform: scale(1.1);
}

.gallery-item-actions .btn-delete {
    background: #ff6b6b;
}

.gallery-item-actions .btn-delete:hover {
    background: #ee5a52;
    transform: scale(1.1);
}

/* Cover Preview */
#currentCoverPreview {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s;
}

#currentCoverPreview.has-image {
    border-style: solid;
    border-color: #667eea;
    background: white;
}

#currentCoverPreview img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

/* Upload Progress */
.upload-progress {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    display: none;
}

.upload-progress.show {
    display: block;
}

.upload-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s;
}

.upload-progress-text {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
}

/* Task Tables */
.task-table-card {
    animation: fadeInUp 0.4s ease;
}

.task-table-card .table {
    margin-bottom: 0;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.task-table-card .table thead th {
    font-weight: 600;
    padding: 12px;
    border: none;
}

.task-table-card .table tbody td {
    padding: 12px;
    transition: all 0.2s;
}

.task-table-card .table tbody td:hover {
    background: rgba(102, 126, 234, 0.05) !important;
}

.task-table-card .table tbody tr:hover td:first-child {
    background: rgba(102, 126, 234, 0.15) !important;
}

.task-table-card input[type="checkbox"] {
    transform: scale(1.2);
    transition: all 0.2s;
}

.task-table-card input[type="checkbox"]:hover {
    transform: scale(1.4);
}

/* 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 .game-info-section {
    border-bottom: 2px solid #e9ecef !important;
}

.theme-indigo-light .game-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 .game-info-card h4,
.theme-indigo-light .game-info-card .fw-semibold {
    color: #212529 !important;
}

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

.theme-indigo-light .game-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 .game-info-section {
    border-bottom: 2px solid rgba(139, 92, 246, 0.3) !important;
}

.theme-indigo-dark .game-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 .game-info-card h4,
.theme-indigo-dark .game-info-card .fw-semibold {
    color: #e2e8f0 !important;
}

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

.theme-indigo-dark .game-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);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden !important;
    }
    
    /* Remove container padding for full-width on mobile */
    .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
        overflow-x: hidden !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;
    }
    
    /* Fix image breaking on mobile */
    .game-info-section .col-12.text-center img,
    .game-placeholder {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    /* Release Date - Stack label and value on separate lines but side by side */
    .game-info-card .text-end {
        text-align: left !important;
        margin-top: 1rem;
        width: 100%;
    }
    
    .game-info-card .d-flex.align-items-center.justify-content-between {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .game-info-card .text-end small,
    .game-info-card .text-end .badge {
        display: inline-block !important;
    }
    
    .game-info-card .text-end small {
        margin-right: 0.5rem;
    }
    
    /* Recommendation buttons - stack vertically with same width */
    .rating-options {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .rating-option {
        width: 100% !important;
    }
    
    .rating-option label {
        width: 100% !important;
    }
    
    /* Platform Tracking Section - Mobile Layout */
    /* Hide static headers on mobile */
    #platformTrackingSection .row.mb-2.px-3 {
        display: none !important;
    }
    
    /* Platform row mobile layout - stack fields vertically with labels */
    .platform-row .row {
        flex-direction: column !important;
    }
    
    .platform-row .row > div[class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Add label before each input on mobile */
    .platform-row .col-md-3:has(select)::before {
        content: attr(data-label);
        display: block;
        font-weight: bold;
        font-size: 0.85rem;
        color: #6c757d;
        margin-bottom: 0.5rem;
    }
    
    .platform-row .col-md-2:has(input[name*="achievement_done"])::before {
        content: "🏅 Conquistas Concluídas";
        display: block;
        font-weight: bold;
        font-size: 0.85rem;
        color: #6c757d;
        margin-bottom: 0.5rem;
    }
    
    .platform-row .col-md-2:has(input[name*="achievement_total"])::before {
        content: "🏆 Total de Conquistas";
        display: block;
        font-weight: bold;
        font-size: 0.85rem;
        color: #6c757d;
        margin-bottom: 0.5rem;
    }
    
    .platform-row .col-md-3:has(input[name*="game_time"])::before {
        content: "⏰ Tempo de Jogo (horas)";
        display: block;
        font-weight: bold;
        font-size: 0.85rem;
        color: #6c757d;
        margin-bottom: 0.5rem;
    }
    
    .platform-row .col-md-2.text-end {
        text-align: left !important;
        margin-bottom: 0 !important;
    }
    
    /* Platform select needs label dynamically */
    #platformTrackingSection .platform-row .col-md-3:first-child::before {
        content: "💻 PLATAFORMA";
        display: block;
        font-weight: bold;
        font-size: 0.85rem;
        color: #6c757d;
        margin-bottom: 0.5rem;
    }
    
    /* Action buttons at bottom - 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;
    }
}
