/* Estilos personalizados para el Balotario */

:root {
    /* Base colors */
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-bg: #ecf0f1;

    /* Light theme colors */
    --light-text: #333333;
    --light-bg-primary: #ffffff;
    --light-bg-secondary: #f8f9fa;
    --light-border: #e9ecef;

    /* Dark theme colors */
    --dark-bg-primary: #2c3e50;
    --dark-bg-secondary: #34495e;
    --dark-bg-tertiary: #4a5f7a;
    --dark-bg-hover: #3d566e;
    --dark-bg-secondary-hover: #5a6f8a;
    --dark-text-primary: #ecf0f1;
    --dark-text-secondary: #e0e0e0;
    --dark-text-muted: #bbb;
    --dark-border: #5a6c7d;

    /* Extended color palette */
    --white: #ffffff;
    --success-light: #58d68d;
    --success-border: #2ecc71;
    --success-dark: #1e7e34;
    --success-text: #0d4016;
    --danger-light: #ec7063;
    --danger-border: #c82333;
    --danger-text: #721c24;
    --warning-light: #f7dc6f;
    --info-color: #17a2b8;
    --purple: #8e44ad;
    --purple-light: #a569bd;
    --purple-hover: #9b59b6;
    --purple-border: #bb8fce;
    --blue-light: #5dade2;
    --gradient-blue-start: #667eea;
    --gradient-blue-end: #764ba2;
    --modal-border: #dee2e6;
    --dark-body-bg: #1a1a1a;

    /* Question navigator colors */
    --nav-btn-default: var(--dark-bg-secondary);
    --nav-btn-default-border: var(--dark-border);
    --nav-btn-hover: var(--dark-bg-tertiary);
    --nav-btn-visited: var(--purple);
    --nav-btn-visited-border: var(--purple-light);
    --nav-btn-visited-hover: var(--purple-hover);
    --nav-btn-visited-hover-border: var(--purple-border);
    --nav-btn-answered: var(--success-color);
    --nav-btn-answered-border: var(--success-border);
    --nav-btn-current: var(--secondary-color);
    --nav-btn-current-border: var(--blue-light);

    /* Shadow colors */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --shadow-medium-intense: rgba(0, 0, 0, 0.15);
    --shadow-dark: rgba(0, 0, 0, 0.3);
    --shadow-blue: rgba(52, 152, 219, 0.4);
    --shadow-blue-intense: rgba(52, 152, 219, 0.5);
    --shadow-green: rgba(39, 174, 96, 0.4);
    --shadow-purple: rgba(142, 68, 173, 0.4);
    --shadow-purple-intense: rgba(155, 89, 182, 0.5);

    /* Background alpha colors - for better DRY */
    --bg-secondary-alpha-10: rgba(52, 152, 219, 0.1);
    --bg-secondary-alpha-20: rgba(52, 152, 219, 0.2);
    --bg-secondary-alpha-25: rgba(52, 152, 219, 0.25);
    --bg-secondary-alpha-30: rgba(52, 152, 219, 0.3);
    --bg-secondary-alpha-35: rgba(52, 152, 219, 0.35);
    --bg-success-alpha-20: rgba(39, 174, 96, 0.2);
    --bg-success-alpha-25: rgba(39, 174, 96, 0.25);
    --bg-success-alpha-30: rgba(39, 174, 96, 0.3);
    --bg-success-alpha-40: rgba(39, 174, 96, 0.4);
    --bg-danger-alpha-20: rgba(231, 76, 60, 0.2);
    --bg-danger-alpha-25: rgba(231, 76, 60, 0.25);
    --bg-danger-alpha-30: rgba(231, 76, 60, 0.3);
    --bg-danger-alpha-40: rgba(231, 76, 60, 0.4);
    --bg-white-alpha-95: rgba(255, 255, 255, 0.95);
    --bg-dark-primary-alpha-95: rgba(44, 62, 80, 0.95);
    --bg-dark-primary-alpha-98: rgba(44, 62, 80, 0.98);
    --bg-navbar-dark: rgba(26, 26, 26, 0.95);
    --bg-white-alpha-10: rgba(255, 255, 255, 0.1);
    --bg-white-alpha-20: rgba(255, 255, 255, 0.2);
    --bg-white-alpha-30: rgba(255, 255, 255, 0.3);
    --bg-white-alpha-50: rgba(255, 255, 255, 0.5);
    --bg-modal-backdrop: rgba(0, 0, 0, 0.5);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--gradient-blue-start) 0%, var(--gradient-blue-end) 100%);
    --gradient-success: linear-gradient(45deg, var(--success-color), var(--success-light));
    --gradient-danger: linear-gradient(45deg, var(--danger-color), var(--danger-light));
    --gradient-warning: linear-gradient(45deg, var(--warning-color), var(--warning-light));
}

/* Animaciones personalizadas */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Efectos de hover mejorados */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--shadow-medium-intense);
}

/* Botones con efectos especiales */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--bg-white-alpha-30), transparent);
    transition: left 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

/* Indicadores de progreso mejorados */
.progress-ring {
    width: 120px;
    height: 120px;
    position: relative;
}

.progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.progress-ring .bg {
    stroke: var(--bg-white-alpha-20);
}

.progress-ring .progress {
    stroke: var(--white);
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.5s ease-in-out;
}

/* Efectos de texto */
.text-glow {
    text-shadow: 0 0 10px var(--bg-white-alpha-50);
}

.text-gradient {
    background: linear-gradient(45deg, var(--gradient-blue-start), var(--gradient-blue-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tarjetas de preguntas mejoradas - tema claro por defecto */
.question-card-enhanced {
    background: var(--white);
    color: var(--light-text);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 15px 35px var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.question-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

/* Opciones de respuesta mejoradas */
.option-enhanced {
    background: var(--white);
    border: 2px solid var(--light-border);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.option-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--bg-secondary-alpha-10), transparent);
    transition: left 0.3s ease;
    pointer-events: none;
}

.option-enhanced:hover::before {
    left: 100%;
}

.option-enhanced:hover {
    border-color: var(--secondary-color);
    transform: translateX(5px);
    box-shadow: 0 8px 25px var(--shadow-blue);
}

.option-enhanced.selected {
    border-color: var(--secondary-color);
    background: var(--bg-secondary-alpha-25);
    transform: translateX(5px);
    box-shadow: 0 4px 15px var(--bg-secondary-alpha-30);
}

.option-enhanced.correct {
    border-color: var(--success-color);
    background: var(--bg-success-alpha-25);
    animation: pulse 0.6s ease-in-out;
    color: var(--success-dark);
    font-weight: 600;
}

.option-enhanced.incorrect {
    border-color: var(--danger-color);
    background: var(--bg-danger-alpha-25);
    color: var(--danger-text);
    font-weight: 600;
}

/* Navegador de preguntas mejorado */
.question-navigator {
    background: var(--bg-white-alpha-95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 25px var(--shadow-light);
}

.nav-question-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--light-border);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 5px;
}

.nav-question-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px var(--shadow-medium);
}

.nav-question-btn.answered {
    background: var(--gradient-success);
    border-color: var(--success-color);
    color: white;
}

.nav-question-btn.current {
    background: var(--gradient-primary);
    border-color: var(--secondary-color);
    color: white;
    animation: pulse 2s infinite;
}

/* Timer mejorado */
.timer-display {
    background: var(--gradient-warning);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.3);
    position: relative;
}

.timer-display.warning {
    background: var(--gradient-danger);
    animation: pulse 1s infinite;
}

/* Estadísticas mejoradas */
.stats-enhanced {
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stats-enhanced::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--bg-white-alpha-10) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 0 2px 4px var(--shadow-dark);
}

/* Responsive mejoras */
@media (max-width: 768px) {
    .question-card-enhanced {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .option-enhanced {
        padding: 15px;
        margin-bottom: 10px;
    }

    .nav-question-btn {
        width: 40px;
        height: 40px;
        margin: 3px;
    }

    .timer-display {
        font-size: 1.2rem;
        padding: 10px 20px;
    }
}

/* Tema claro - respuestas seleccionadas más intensas */
[data-theme="light"] .option-enhanced.selected,
:root:not([data-theme="dark"]) .option-enhanced.selected {
    border-color: var(--secondary-color);
    background: var(--bg-secondary-alpha-35);
    transform: translateX(5px);
    box-shadow: 0 6px 20px var(--shadow-blue);
    border-width: 3px;
}

[data-theme="light"] .option-btn.selected,
:root:not([data-theme="dark"]) .option-btn.selected {
    background: var(--bg-secondary-alpha-35) !important;
    border-color: var(--secondary-color) !important;
    box-shadow: 0 6px 20px var(--shadow-blue) !important;
    border-width: 3px !important;
}

/* Tema claro - respuestas correctas más intensas */
[data-theme="light"] .option-enhanced.correct,
:root:not([data-theme="dark"]) .option-enhanced.correct {
    border-color: var(--success-dark);
    background: var(--bg-success-alpha-40);
    color: var(--success-text);
    font-weight: 700;
    border-width: 3px;
    box-shadow: 0 6px 20px var(--shadow-green);
}

[data-theme="light"] .option-btn.correct,
:root:not([data-theme="dark"]) .option-btn.correct {
    background: var(--bg-success-alpha-40) !important;
    border-color: var(--success-dark) !important;
    color: var(--success-text) !important;
    font-weight: 700 !important;
    border-width: 3px !important;
    box-shadow: 0 6px 20px var(--shadow-green) !important;
}

/* Tema claro - respuestas incorrectas más intensas */
[data-theme="light"] .option-enhanced.incorrect,
:root:not([data-theme="dark"]) .option-enhanced.incorrect {
    border-color: var(--danger-border);
    background: var(--bg-danger-alpha-40);
    color: var(--danger-text);
    font-weight: 700;
    border-width: 3px;
    box-shadow: 0 6px 20px var(--bg-danger-alpha-30);
}

[data-theme="light"] .option-btn.incorrect,
:root:not([data-theme="dark"]) .option-btn.incorrect {
    background: var(--bg-danger-alpha-40) !important;
    border-color: var(--danger-border) !important;
    color: var(--danger-text) !important;
    font-weight: 700 !important;
    border-width: 3px !important;
    box-shadow: 0 6px 20px var(--bg-danger-alpha-30) !important;
}

/* Modal support for light theme - ensuring proper styling */
[data-theme="light"] .modal-content,
:root:not([data-theme="dark"]) .modal-content {
    background: var(--white) !important;
    color: var(--light-text) !important;
    border: 1px solid var(--modal-border) !important;
}

[data-theme="light"] .modal-header,
:root:not([data-theme="dark"]) .modal-header {
    border-bottom-color: var(--modal-border) !important;
}

[data-theme="light"] .modal-footer,
:root:not([data-theme="dark"]) .modal-footer {
    border-top-color: var(--modal-border) !important;
}

[data-theme="light"] .modal-title,
:root:not([data-theme="dark"]) .modal-title {
    color: var(--light-text) !important;
}

/* Tema claro - question cards */
[data-theme="light"] .question-card-enhanced,
:root:not([data-theme="dark"]) .question-card-enhanced {
    background: var(--white) !important;
    color: var(--light-text) !important;
    box-shadow: 0 15px 35px var(--shadow-light) !important;
}

[data-theme="light"] .question-card,
:root:not([data-theme="dark"]) .question-card {
    background: var(--white) !important;
    color: var(--light-text) !important;
}

/* Modo oscuro */
[data-theme="dark"] {
    background: var(--dark-body-bg) !important;
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, var(--dark-bg-primary) 0%, var(--dark-bg-secondary) 100%) !important;
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] .container-main {
    background: var(--bg-dark-primary-alpha-95) !important;
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] .card {
    background: var(--dark-bg-secondary) !important;
    color: var(--dark-text-secondary) !important;
    border-color: var(--dark-bg-tertiary) !important;
}

[data-theme="dark"] .question-card,
[data-theme="dark"] .question-card-enhanced {
    background: var(--dark-bg-secondary) !important;
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] .option-btn,
[data-theme="dark"] .option-enhanced {
    background: var(--dark-bg-primary) !important;
    border-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] .option-btn:hover,
[data-theme="dark"] .option-enhanced:hover {
    background: var(--dark-bg-hover) !important;
    border-color: var(--secondary-color) !important;
}

[data-theme="dark"] .option-btn.correct,
[data-theme="dark"] .option-enhanced.correct {
    background: var(--bg-success-alpha-30) !important;
    border-color: var(--success-color) !important;
    color: var(--white) !important;
}

[data-theme="dark"] .option-btn.incorrect,
[data-theme="dark"] .option-enhanced.incorrect {
    background: var(--bg-danger-alpha-30) !important;
    border-color: var(--danger-color) !important;
    color: var(--white) !important;
}

[data-theme="dark"] .option-btn.selected,
[data-theme="dark"] .option-enhanced.selected {
    background: var(--bg-secondary-alpha-30) !important;
    border-color: var(--secondary-color) !important;
    color: var(--white) !important;
}

[data-theme="dark"] .navbar {
    background: var(--bg-navbar-dark) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: var(--dark-bg-primary) !important;
    border-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background: var(--dark-bg-secondary) !important;
    border-color: var(--secondary-color) !important;
    color: var(--dark-text-secondary) !important;
    box-shadow: 0 0 0 0.2rem var(--bg-secondary-alpha-25) !important;
}

[data-theme="dark"] .alert-success {
    background: var(--bg-success-alpha-20) !important;
    border-color: var(--success-color) !important;
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] .alert-danger {
    background: var(--bg-danger-alpha-20) !important;
    border-color: var(--danger-color) !important;
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] .badge {
    color: var(--white) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--dark-text-muted) !important;
}

[data-theme="dark"] .correct-option {
    background: var(--bg-success-alpha-40) !important;
    border-color: var(--success-color) !important;
    color: var(--white) !important;
}

[data-theme="dark"] .answer-indicator {
    color: var(--success-color) !important;
}

[data-theme="dark"] .fa-check-circle {
    color: var(--success-color) !important;
}

[data-theme="dark"] .text-success {
    color: var(--success-border) !important;
}

[data-theme="dark"] .text-danger {
    color: var(--danger-color) !important;
}

[data-theme="dark"] .text-warning {
    color: var(--warning-color) !important;
}

[data-theme="dark"] .text-primary {
    color: var(--secondary-color) !important;
}

/* Modal support for dark theme */
[data-theme="dark"] .modal-content {
    background: var(--dark-bg-primary) !important;
    color: var(--dark-text-secondary) !important;
    border: 1px solid var(--dark-bg-tertiary) !important;
}

[data-theme="dark"] .modal-header {
    border-bottom-color: var(--dark-bg-tertiary) !important;
}

[data-theme="dark"] .modal-footer {
    border-top-color: var(--dark-bg-tertiary) !important;
}

[data-theme="dark"] .modal-title {
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Buttons in dark theme */
[data-theme="dark"] .btn-secondary {
    background: var(--dark-bg-tertiary) !important;
    border-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--dark-bg-secondary-hover) !important;
    border-color: var(--dark-bg-secondary-hover) !important;
}

[data-theme="dark"] .btn-outline-secondary {
    border-color: var(--dark-bg-tertiary) !important;
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background: var(--dark-bg-tertiary) !important;
    border-color: var(--dark-bg-tertiary) !important;
    color: var(--white) !important;
}

[data-theme="dark"] .btn-outline-primary {
    border-color: var(--secondary-color) !important;
    color: var(--secondary-color) !important;
}

[data-theme="dark"] .btn-outline-primary:hover {
    background: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: var(--white) !important;
}

/* Progress bars in dark theme */
[data-theme="dark"] .progress {
    background: var(--bg-white-alpha-10) !important;
}

/* Badges in dark theme */
[data-theme="dark"] .badge.bg-warning {
    background: var(--warning-color) !important;
    color: var(--white) !important;
}

[data-theme="dark"] .badge.bg-success {
    background: var(--success-color) !important;
    color: var(--white) !important;
}

[data-theme="dark"] .badge.bg-primary {
    background: var(--secondary-color) !important;
    color: var(--white) !important;
}

/* Question navigator buttons in dark theme */
/* Dark theme question navigator buttons - DRY approach with CSS variables */
[data-theme="dark"] .question-nav-btn,
[data-theme="dark"] .nav-question-btn {
    background: var(--nav-btn-default) !important;
    border: 2px solid var(--nav-btn-default-border) !important;
    color: var(--dark-text-primary) !important;
    box-shadow: 0 2px 8px var(--shadow-dark) !important;
    transition: all 0.3s ease !important;
}

/* Hover state for all buttons */
[data-theme="dark"] .question-nav-btn:hover,
[data-theme="dark"] .nav-question-btn:hover {
    background: var(--nav-btn-hover) !important;
    border-color: var(--secondary-color) !important;
    color: var(--white) !important;
    box-shadow: 0 4px 12px var(--shadow-blue) !important;
    transform: scale(1.05) !important;
}

/* Visited questions - purple */
[data-theme="dark"] .question-nav-btn.visited,
[data-theme="dark"] .nav-question-btn.visited {
    background: var(--nav-btn-visited) !important;
    border-color: var(--nav-btn-visited-border) !important;
    color: var(--white) !important;
    box-shadow: 0 3px 10px var(--shadow-purple) !important;
}

[data-theme="dark"] .question-nav-btn.visited:hover,
[data-theme="dark"] .nav-question-btn.visited:hover {
    background: var(--nav-btn-visited-hover) !important;
    border-color: var(--nav-btn-visited-hover-border) !important;
    box-shadow: 0 4px 12px var(--shadow-purple-intense) !important;
}

/* Answered questions - green (higher priority than visited) */
[data-theme="dark"] .question-nav-btn.answered,
[data-theme="dark"] .nav-question-btn.answered,
[data-theme="dark"] .question-nav-btn.btn-success,
[data-theme="dark"] .nav-question-btn.btn-success {
    background: var(--nav-btn-answered) !important;
    border-color: var(--nav-btn-answered-border) !important;
    color: var(--white) !important;
    box-shadow: 0 3px 10px var(--shadow-green) !important;
}

/* Current question - blue (highest priority) */
[data-theme="dark"] .question-nav-btn.current,
[data-theme="dark"] .nav-question-btn.current,
[data-theme="dark"] .question-nav-btn.btn-primary,
[data-theme="dark"] .nav-question-btn.btn-primary {
    background: var(--nav-btn-current) !important;
    border-color: var(--nav-btn-current-border) !important;
    color: var(--white) !important;
    box-shadow: 0 3px 10px var(--shadow-blue-intense) !important;
    transform: scale(1.1) !important;
    z-index: 10 !important;
}

/* Timer and other exam elements */
[data-theme="dark"] .timer-display {
    background: var(--gradient-warning) !important;
    color: var(--white) !important;
}

[data-theme="dark"] .timer-display.warning {
    background: var(--gradient-danger) !important;
}

/* Question navigator card */
[data-theme="dark"] .question-navigator {
    background: var(--bg-dark-primary-alpha-98) !important;
    color: var(--dark-text-primary) !important;
    border: 1px solid var(--dark-border) !important;
    box-shadow: 0 4px 15px var(--shadow-dark) !important;
}

[data-theme="dark"] .question-navigator .card-title {
    color: var(--dark-text-primary) !important;
    border-bottom: 1px solid var(--dark-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Modal theme support only - no interference with Bootstrap functionality */

/* Modal with reasonable z-index */
.modal {
    z-index: 1055;
}

.modal-backdrop {
    z-index: 1050;
}

/* Custom modal styling */
#confirmModal {
    z-index: 1055;
}

#confirmBackdrop {
    z-index: 1050;
}

#confirmDialog {
    z-index: 1055;
}

/* Prevent scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Ensure modal doesn't cause horizontal scroll */
#confirmModal {
    overflow-x: hidden;
    overflow-y: auto;
}

#confirmDialog {
    margin: 20px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
}

/* Force modal to be centered and visible */
#confirmModal.show {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

#confirmModal .modal-dialog {
    margin: 0 !important;
    position: relative !important;
}

/* Ensure backdrop covers entire screen */
.modal-backdrop.show {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: var(--bg-modal-backdrop) !important;
}

/* Custom modal theme support */
[data-theme="dark"] #confirmDialog {
    background: var(--dark-bg-primary) !important;
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] #confirmDialog h5 {
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] #confirmDialog p {
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] #confirmDialog #confirm-message {
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] #confirmModalClose {
    color: var(--dark-text-secondary) !important;
}

/* Modo oscuro automático removido para evitar conflictos */

/* Efectos de carga */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {

    0%,
    20% {
        content: '';
    }

    40% {
        content: '.';
    }

    60% {
        content: '..';
    }

    80%,
    100% {
        content: '...';
    }
}

/* Confetti effect para celebrar */
.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1040;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--warning-color);
    animation: confetti-fall 3s linear infinite;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}
