/* TDW Custom Theme for Horizontal Layout */

/* Replace primary colors with TDW red */
:root {
    --bs-primary: #dc2626;
    --bs-primary-rgb: 220, 38, 38;
}

/* Main navbar - replace purple with TDW red gradient */
.layout-horizontal .main-navbar {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
}

/* Stats icons - use TDW red variations */
.stats-icon.purple {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
}

.stats-icon.blue {
    background: linear-gradient(135deg, #dc2626, #f87171) !important;
}

.stats-icon.green {
    background: linear-gradient(135deg, #b91c1c, #dc2626) !important;
}

.stats-icon.red {
    background: linear-gradient(135deg, #991b1b, #b91c1c) !important;
}

/* Buttons */
.btn-primary {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
}

.btn-primary:hover {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
}

.btn-outline-primary {
    color: #dc2626 !important;
    border-color: #dc2626 !important;
}

.btn-outline-primary:hover {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

/* Start Conversation Button - Light Mode */
[data-bs-theme="light"] .btn-light-primary,
body:not([data-bs-theme="dark"]) .btn-light-primary {
    background-color: rgba(220, 38, 38, 0.1) !important;
    color: #dc2626 !important;
    border-color: rgba(220, 38, 38, 0.2) !important;
}

[data-bs-theme="light"] .btn-light-primary:hover,
body:not([data-bs-theme="dark"]) .btn-light-primary:hover {
    background-color: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

/* Start Conversation Button - Dark Mode */
[data-bs-theme="dark"] .btn-light-primary {
    background-color: rgba(220, 38, 38, 0.2) !important;
    color: #dc2626 !important;
    border-color: rgba(220, 38, 38, 0.3) !important;
}

[data-bs-theme="dark"] .btn-light-primary:hover {
    background-color: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

/* Form controls focus - Light Mode */
[data-bs-theme="light"] .form-control:focus,
body:not([data-bs-theme="dark"]) .form-control:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.25) !important;
}

/* Form controls focus - Dark Mode */
[data-bs-theme="dark"] .form-control:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.4) !important;
}

/* Text colors */
.text-primary {
    color: #dc2626 !important;
}

/* Background colors */
.bg-primary {
    background-color: #dc2626 !important;
}

/* Border colors */
.border-primary {
    border-color: #dc2626 !important;
}

/* Progress bars */
.progress-bar {
    background-color: #dc2626 !important;
}

/* Badges */
.badge.bg-primary {
    background-color: #dc2626 !important;
}

/* Notification badge */
.badge-notification {
    background-color: #dc2626 !important;
}

/* Links - light mode */
[data-bs-theme="light"] a,
body:not([data-bs-theme="dark"]) a {
    color: #dc2626 !important;
}

[data-bs-theme="light"] a:hover,
body:not([data-bs-theme="dark"]) a:hover {
    color: #b91c1c !important;
}

/* Links - dark mode (keep white) */
[data-bs-theme="dark"] a {
    color: #ffffff !important;
}

[data-bs-theme="dark"] a:hover {
    color: #f3f4f6 !important;
}

/* Table row hover */
[data-bs-theme="light"] .table-hover tbody tr:hover,
body:not([data-bs-theme="dark"]) .table-hover tbody tr:hover {
    background-color: rgba(220, 38, 38, 0.05) !important;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(220, 38, 38, 0.1) !important;
}

/* Card hover effects */
[data-bs-theme="light"] .card:hover,
body:not([data-bs-theme="dark"]) .card:hover {
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.1) !important;
}

[data-bs-theme="dark"] .card:hover {
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2) !important;
}

/* Logo size adjustment - with higher specificity to override template */
.layout-horizontal .logo img,
html[data-bs-theme="dark"] .layout-horizontal .header-top .logo img,
html[data-bs-theme="light"] .layout-horizontal .header-top .logo img,
.layout-horizontal .header-top .logo img {
    height: 55px !important;
    width: auto !important;
}

/* Header top padding adjustment for bigger logo */
.layout-horizontal .header-top {
    padding: 1.1rem 0.4rem !important;
}

/* Force dark mode header background and padding */
[data-bs-theme="dark"] .layout-horizontal .header-top {
    background-color: #171722 !important;
    padding: 1.1rem 0.4rem !important;
}

/* Main navbar text colors - force white */
.layout-horizontal .main-navbar .menu-link {
    color: #ffffff !important;
}

.layout-horizontal .main-navbar .menu-link:hover,
.layout-horizontal .main-navbar .menu-item.active .menu-link {
    color: #ffffff !important;
}

/* Submenu text colors - force white on hover */
.layout-horizontal .main-navbar .submenu .submenu-link {
    color: #495057 !important;
}

.layout-horizontal .main-navbar .submenu .submenu-link:hover {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .layout-horizontal .main-navbar .submenu .submenu-link {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .layout-horizontal .main-navbar .submenu .submenu-link:hover {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

/* User dropdown styling */
.layout-horizontal .user-dropdown-name {
    color: #495057 !important;
}

[data-bs-theme="dark"] .layout-horizontal .user-dropdown-name {
    color: #ffffff !important;
}

.layout-horizontal .user-dropdown-status {
    color: #6c757d !important;
}

[data-bs-theme="dark"] .layout-horizontal .user-dropdown-status {
    color: #adb5bd !important;
}

/* User dropdown menu items */
.layout-horizontal .dropdown-menu .dropdown-item {
    color: #495057 !important;
}

.layout-horizontal .dropdown-menu .dropdown-item:hover {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .layout-horizontal .dropdown-menu .dropdown-item {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .layout-horizontal .dropdown-menu .dropdown-item:hover {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

/* Theme toggle styling - slider switch */
.layout-horizontal .theme-toggle {
    gap: 10px;
    align-items: center;
}

.layout-horizontal .dropdown-menu .theme-toggle {
    padding: 0.5rem 0;
    margin: 0;
}

.layout-horizontal .theme-icon {
    color: #6c757d;
    font-size: 14px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.layout-horizontal .theme-toggle-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.layout-horizontal .theme-toggle-input {
    display: none;
}

.layout-horizontal .theme-toggle-label {
    display: block;
    width: 40px;
    height: 20px;
    background: #dc2626;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.layout-horizontal .theme-toggle-button {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.layout-horizontal .theme-toggle-input:checked + .theme-toggle-label {
    background: #dc2626;
}

.layout-horizontal .theme-toggle-input:checked + .theme-toggle-label .theme-toggle-button {
    transform: translateX(20px);
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .layout-horizontal .theme-icon {
    color: #adb5bd;
}

[data-bs-theme="dark"] .layout-horizontal .theme-toggle-label {
    background: #495057;
}

[data-bs-theme="dark"] .layout-horizontal .theme-toggle-input:checked + .theme-toggle-label {
    background: #dc2626;
}

/* Authentication Page Styling */
#auth .auth-title,
#auth-left .auth-title,
#auth h1.auth-title {
    color: #f87171 !important;
    font-weight: 600 !important;
    font-size: 2.75rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.2 !important;
    text-shadow: 0 4px 8px rgba(220, 38, 38, 0.2) !important;
}

.auth-subtitle {
    color: #6c757d !important;
    margin-bottom: 2.5rem !important;
    font-size: 1.1rem !important;
    line-height: 1.5 !important;
}

.auth-logo {
    margin-bottom: 2.5rem !important;
    text-align: left !important;
}

.auth-logo img {
    height: 65px !important;
    width: auto !important;
    filter: none !important;
}

/* Login form container */
#auth-left {
    padding: 3.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-height: 100vh !important;
    background-color: #ffffff !important;
}

/* Login Background */
#auth-right {
    background-image: url('/assets/compiled/images/login-background.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative !important;
    min-height: 100vh !important;
}

#auth-right::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(45deg, rgba(220, 38, 38, 0.4), rgba(239, 68, 68, 0.3)) !important;
    z-index: 1 !important;
}

/* Form styling improvements */
#auth .form-group {
    margin-bottom: 1.5rem !important;
}

#auth .form-control {
    border-radius: 0.75rem !important;
    border: 1px solid #e5e7eb !important;
    padding: 0.875rem 1rem 0.875rem 3rem !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
}

#auth .form-control:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.15) !important;
    outline: none !important;
}

/* Icon positioning handled by original template */

#auth .form-check {
    margin-bottom: 2rem !important;
}

#auth .form-check-input {
    border-radius: 0.375rem !important;
    border: 2px solid #d1d5db !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
}

#auth .form-check-input:checked {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
}

#auth .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.15) !important;
}

#auth .form-check-label {
    font-size: 0.95rem !important;
    margin-left: 0.5rem !important;
}

#auth .btn-primary {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    border: none !important;
    border-radius: 0.75rem !important;
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    text-transform: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
}

#auth .btn-primary:hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4) !important;
}

#auth .text-center a {
    color: #f87171 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    transition: color 0.2s ease !important;
}

#auth .text-center a:hover {
    color: #ef4444 !important;
    text-decoration: underline !important;
}

/* Dark mode auth adjustments */
[data-bs-theme="dark"] .auth-title {
    color: #f87171 !important;
    text-shadow: 0 2px 4px rgba(239, 68, 68, 0.4) !important;
}

[data-bs-theme="dark"] .auth-subtitle {
    color: #d1d5db !important;
}

[data-bs-theme="dark"] #auth-left {
    background-color: #111827 !important;
}

[data-bs-theme="dark"] #auth-right::before {
    background: linear-gradient(45deg, rgba(220, 38, 38, 0.5), rgba(239, 68, 68, 0.4)) !important;
}

[data-bs-theme="dark"] #auth .form-control {
    background-color: rgba(55, 65, 81, 0.8) !important;
    border-color: rgba(75, 85, 99, 0.6) !important;
    color: #f9fafb !important;
    backdrop-filter: blur(10px) !important;
}

[data-bs-theme="dark"] #auth .form-control:focus {
    background-color: rgba(55, 65, 81, 0.9) !important;
    border-color: #f87171 !important;
    color: #f9fafb !important;
    box-shadow: 0 0 0 0.2rem rgba(248, 113, 113, 0.1) !important;
}

[data-bs-theme="dark"] #auth .form-control::placeholder {
    color: rgba(209, 213, 219, 0.8) !important;
}

/* Dark mode icon colors only */
[data-bs-theme="dark"] #auth .form-control-icon {
    color: rgba(209, 213, 219, 0.9) !important;
}

[data-bs-theme="dark"] #auth .form-check-input {
    background-color: rgba(55, 65, 81, 0.8) !important;
    border-color: rgba(75, 85, 99, 0.6) !important;
}

[data-bs-theme="dark"] #auth .form-check-input:checked {
    background-color: #f87171 !important;
    border-color: #f87171 !important;
}

[data-bs-theme="dark"] #auth .form-check-label {
    color: #d1d5db !important;
}

[data-bs-theme="dark"] #auth .text-center a {
    color: #ef4444 !important;
}

[data-bs-theme="dark"] #auth .text-center a:hover {
    color: #f87171 !important;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    #auth-left {
        padding: 2rem !important;
        min-height: 100vh !important;
    }

    .auth-title {
        font-size: 2.25rem !important;
    }

    .auth-subtitle {
        font-size: 1rem !important;
    }
}

@media (max-width: 575.98px) {
    #auth-left {
        padding: 1.5rem !important;
    }

    .auth-title {
        font-size: 2rem !important;
    }

    .auth-logo img {
        height: 55px !important;
    }
}

/* =================
   LOTTERY MODULE CSS
   ================= */

/* Dashboard Header Component - used across lottery views */
.dashboard-header {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.header-icon {
    background: rgba(52, 152, 219, 0.2);
    padding: 12px;
    border-radius: 8px;
}

/* Button danger override */
.btn-danger {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.btn-danger:hover {
    background: #c82333 !important;
    border-color: #bd2130 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Action buttons hover styles - Override global theme hover colors */
.btn-outline-danger:hover {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

.btn-outline-warning:hover {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #ffffff !important;
}

/* More specific override for anchor tags in buttons */
a.btn-outline-danger:hover,
a.btn-outline-warning:hover {
    color: #ffffff !important;
}

.btn-group a.btn:hover {
    color: #ffffff !important;
}

/* Lottery specific card styling */
.lottery-info-card {
    border-left: 4px solid #dc3545;
}

/* DataTables styling - consistent across all lottery tables */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px 8px;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px 8px;
}

/* =================
   SELECT2 DARK THEME - used in lottery forms
   ================= */

/* Select2 Dark Theme Styling */
.select2-container--bootstrap-5 .select2-selection--multiple {
    background-color: #1b1b29 !important;
    border: 1px solid #6c757d !important;
    color: #ffffff;
    min-height: 38px;
}

/* Override global dark theme padding for Select2 */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    padding-left: 0px !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
    background-color: #dc3545 !important;
    border: 1px solid #dc3545 !important;
    color: #ffffff !important;
    padding: 2px 8px;
    border-radius: 4px;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") 50%/.75rem auto no-repeat !important;
    color: #ffffff !important;
    border: 0;
    padding-right: 0.5rem;
}

.select2-dropdown {
    background-color: #1b1b29 !important;
    border: 1px solid #6c757d !important;
}

.select2-container--bootstrap-5 .select2-results__option {
    color: #ffffff !important;
    padding-left: 12px !important; /* Override global dark theme padding */
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

.select2-container--bootstrap-5 .select2-results__option--selected {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

.select2-container--bootstrap-5 .select2-results__option[aria-selected="true"] {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

/* More specific override for dark theme ul padding in Select2 */
.select2-dropdown ul.select2-results__options {
    padding-left: 0 !important;
}

.select2-dropdown ul.select2-results__options li {
    padding-left: 12px !important;
}

/* =================
   LIVE DRAW STYLES
   ================= */

/* Live Draw Specific Styles */
@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    80% {
        transform: translateY(-10px);
    }
}

.winner-card {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, #fff7cd, #ffffff);
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .winner-card {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, rgba(255, 199, 7, 0.1), rgba(27, 27, 41, 0.8));
}

.winner-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.round-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 15px 20px;
    margin: 20px 0 10px 0;
    border-radius: 8px;
}

[data-bs-theme="dark"] .round-header {
    background: linear-gradient(135deg, #0d6efd, #084298);
}

.winner-animation i {
    animation: bounce 1s infinite;
}

/* Progress bar styling */
.progress {
    background-color: #e9ecef;
    border-radius: 8px;
}

[data-bs-theme="dark"] .progress {
    background-color: #374151;
}

/* Button transitions */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Live draw control panel */
.live-draw-controls {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

[data-bs-theme="dark"] .live-draw-controls {
    background: linear-gradient(135deg, #374151, #1f2937);
}

/* Winner modal styling */
.winner-modal .modal-content {
    border-radius: 15px;
    overflow: hidden;
}

.winner-modal .modal-header {
    background: linear-gradient(135deg, #ffc107, #ff8c00);
    border: none;
}

/* Avatar styling for winners */
.avatar.bg-warning {
    background: linear-gradient(135deg, #ffc107, #ff8c00) !important;
    color: white !important;
    font-weight: bold;
}

/* Participant count badge */
.participant-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
}

/* Status badges enhancement */
.status-badge {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* Prize Display Box */
.prize-display-box {
    background: linear-gradient(145deg, #ffc107 0%, #ff8c00 50%, #ffa726 100%);
    color: #212529;
    padding: 20px;
    border-radius: 20px;
    border: 3px solid #fff;
    text-align: center;
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4),
                inset 0 1px 0 rgba(255,255,255,0.3);
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.prize-display-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

.prize-display-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 193, 7, 0.5),
                inset 0 1px 0 rgba(255,255,255,0.4);
}

[data-bs-theme="dark"] .prize-display-box {
    background: linear-gradient(145deg, #ffc107 0%, #ff8c00 50%, #ffa726 100%);
    color: #000;
    border-color: #fff;
}

.prize-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.prize-name {
    margin: 0;
    font-weight: 800;
    font-size: 1.3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

/* Winners Progress Container */
.winners-progress-container {
    background: linear-gradient(145deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
    padding: 25px;
    border-radius: 20px;
    border: 3px solid #2196f3;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3),
                inset 0 1px 0 rgba(255,255,255,0.4);
    position: relative;
    overflow: hidden;
}

.winners-progress-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: progressShine 4s infinite;
}

@keyframes progressShine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: -100%; }
}

[data-bs-theme="dark"] .winners-progress-container {
    background: linear-gradient(145deg, #263238 0%, #37474f 50%, #455a64 100%);
    border-color: #2196f3;
}

.progress-header {
    position: relative;
    z-index: 1;
    margin-bottom: 15px !important;
}

.progress-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1976d2;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

[data-bs-theme="dark"] .progress-label {
    color: #64b5f6;
}

.progress-percentage {
    font-weight: 800;
    font-size: 1.2rem;
    color: #0d47a1;
    background: rgba(255,255,255,0.9);
    padding: 4px 12px;
    border-radius: 20px;
    border: 2px solid #2196f3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

[data-bs-theme="dark"] .progress-percentage {
    color: #0d47a1;
    background: rgba(255,255,255,0.95);
}

.progress-text {
    font-weight: 800;
    font-size: 1.1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    color: white !important;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.winners-progress-container .progress {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.2),
                0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    position: relative;
    z-index: 1;
}

.winners-progress-container .progress-bar {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 50%, #1b5e20 100%) !important;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.winners-progress-container .progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        transparent 25%,
        rgba(255,255,255,0.2) 25%,
        rgba(255,255,255,0.2) 50%,
        transparent 50%,
        transparent 75%,
        rgba(255,255,255,0.2) 75%);
    background-size: 30px 30px;
    animation: progressStripe 1s linear infinite;
}

@keyframes progressStripe {
    0% { background-position: 0 0; }
    100% { background-position: 30px 0; }
}

/* =================
   LOADING OVERLAY
   ================= */

/* Global Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid #ffc107;
}

[data-bs-theme="dark"] .loading-content {
    background: linear-gradient(145deg, #1f2937, #374151);
    color: #f3f4f6;
}

.loading-spinner {
    margin-bottom: 20px;
}

.loading-spinner .spinner-border {
    width: 4rem;
    height: 4rem;
    border-width: 0.5rem;
}

.loading-title {
    color: #dc3545;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 20px 0 10px 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

[data-bs-theme="dark"] .loading-title {
    color: #ffc107;
}

.loading-text {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

[data-bs-theme="dark"] .loading-text {
    color: #9ca3af;
}

.loading-progress {
    margin-top: 20px;
}

.loading-progress .progress {
    height: 10px;
    border-radius: 10px;
    background: rgba(220, 53, 69, 0.1);
    overflow: hidden;
}

.loading-progress .progress-bar {
    background: linear-gradient(90deg, #dc3545, #ffc107, #28a745);
    transition: width 0.3s ease;
}

[data-bs-theme="dark"] .loading-progress .progress {
    background: rgba(255, 193, 7, 0.1);
}

/* Participant Loading Indicator */
.participant-loading {
    display: inline-flex;
    align-items: center;
    background: rgba(13, 110, 253, 0.1);
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid rgba(13, 110, 253, 0.3);
    margin-left: 10px;
}

[data-bs-theme="dark"] .participant-loading {
    background: rgba(13, 110, 253, 0.2);
    border-color: rgba(13, 110, 253, 0.4);
}

/* Loading Animation Keyframes */
@keyframes pulse-loading {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading-pulse {
    animation: pulse-loading 1.5s ease-in-out infinite;
}