/* ============= ESTILOS COMPARTIDOS DEL PORTAFOLIO DOCENTE ============= */
/* build: 13.9 — incrementar al forzar recarga de caché en clientes */
/* Extraídos de portafolio.html y grupo-detalle.html para evitar duplicación */

.control-panel {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
}

.timer-display {
    font-size: 3rem;
    font-weight: 800;
    color: #3b82f6;
    text-align: center;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.student-point-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.point-controls button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
}

.btn-add-point {
    background: #22c55e;
    color: white;
}

.btn-remove-point {
    background: #ef4444;
    color: white;
}

.competency-item {
    background: rgba(0, 0, 0, 0.2);
    border-left: 4px solid #fbbf24;
    padding: 15px;
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #10b981);
    transition: width 0.3s ease;
}

.grade-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.grade-table th,
.grade-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.grade-table th {
    background: rgba(168, 85, 247, 0.2);
    font-weight: 700;
}

.grade-input {
    width: 60px;
    padding: 5px;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #fbbf24;
    color: white;
    border-radius: 5px;
}

.alert-card {
    border-left: 5px solid #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-level-high {
    border-left-color: #ef4444;
}

.alert-level-medium {
    border-left-color: #eab308;
}

.alert-level-low {
    border-left-color: #22c55e;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
}

.evidence-upload {
    border: 2px dashed rgba(168, 85, 247, 0.5);
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.evidence-upload:hover {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.05);
}

.comment-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
}

.comment-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid #3b82f6;
    position: relative;
}

.comment-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    border: none;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
}

.planner-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.planner-day {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    min-height: 120px;
}

.planner-day.today {
    border-color: #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

@media (max-width: 1100px) {
    .planner-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .planner-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .planner-grid {
        grid-template-columns: 1fr;
    }

    .points-grid {
        grid-template-columns: 1fr;
    }

    .planner-navigation-bar {
        gap: 10px;
        padding: 12px;
    }

    .week-info-display {
        min-width: unset;
        width: 100%;
        order: -1;
    }

    #display-week-number {
        font-size: 1.1rem;
    }

    #display-date-range {
        font-size: 0.8rem;
    }

    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .btn-today,
    .planner-date-input {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
}

/* Estilo Profesional para el Selector de Semana */
.week-selector-wrapper {
    position: relative;
    flex-grow: 1;
}

.calendar-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a855f7;
    font-size: 1.2rem;
    pointer-events: none;
}

.modern-week-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 2px solid rgba(168, 85, 247, 0.3) !important;
    border-radius: 12px !important;
    padding: 12px 15px 12px 45px !important;
    color: white !important;
    font-size: 1.1rem !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.modern-week-input:focus {
    border-color: #a855f7 !important;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
    background: rgba(0, 0, 0, 0.6) !important;
}

.btn-load-week {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 52px;
}

.btn-load-week:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.4);
    filter: brightness(1.1);
}

.modern-week-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    font-size: 1.3rem;
}

.planner-navigation-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 20px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    margin-bottom: 25px;
}

.week-info-display {
    text-align: center;
    min-width: 250px;
}

#display-week-number {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fbbf24;
    text-transform: uppercase;
}

#display-date-range {
    color: #cbd5e1;
    font-size: 0.9rem;
}

.nav-arrow {
    background: #a855f7;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.2rem;
}

.nav-arrow:hover {
    transform: scale(1.1);
    background: #7c3aed;
}

.btn-today {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.planner-date-input {
    background-color: rgba(168, 85, 247, 0.2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23a855f7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
    color: white;
    border: 1px solid rgba(168, 85, 247, 0.4);
    padding: 8px 12px 8px 36px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    color-scheme: dark;
    position: relative;
    min-width: 44px;
}

.planner-date-input::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    cursor: pointer;
    opacity: 0;
}

.planner-date-input:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.status-indicator {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.8rem;
    color: white;
    transition: 0.3s;
}

/* Contenedor de tarjetas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Tarjeta Estilo Cristal */
.stat-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.icon-blue {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.icon-green {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.icon-red {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    text-transform: uppercase;
}

.stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
}

.stat-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.stat-progress .progress-fill {
    height: 100%;
    width: 0%;
    background: #22c55e;
    transition: width 0.5s ease-out;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

/* BOTONES DE ESTADO PROFESIONALES */
.attendance-checks-pro {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.btn-status-pro {
    flex: 1;
    min-width: 100px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

.btn-status-pro:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    transform: translateY(-2px);
}

/* ESTADOS ACTIVOS CON EFECTO NEÓN */
.btn-status-pro.active-presente {
    background: #22c55e !important;
    color: white !important;
    border-color: #4ade80 !important;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.btn-status-pro.active-tardanza {
    background: #eab308 !important;
    color: white !important;
    border-color: #facc15 !important;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.4);
}

.btn-status-pro.active-ausente {
    background: #ef4444 !important;
    color: white !important;
    border-color: #f87171 !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.btn-status-pro.active-justificado {
    background: #06b6d4 !important;
    color: white !important;
    border-color: #22d3ee !important;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

/* BOTÓN DE COMENTARIO Y ACCIÓN */
.btn-action-pro {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.4);
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-action-pro:hover {
    background: #a855f7;
    color: white;
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.3);
}

/* BOTONES PRINCIPALES (GUARDAR/AGREGAR) */
.btn-main-pro {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
    transition: 0.3s;
}

.btn-main-pro:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
}

/* MEJORAR VISIBILIDAD DEL ÍCONO DE CALENDARIO NATIVO */
#attendance-date::-webkit-calendar-picker-indicator {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    right: 0;
    cursor: pointer;
}

#attendance-date {
    position: relative;
}

/* ============= RULETA ALEATORIA ============= */

#tab-ruleta {
    overflow-x: hidden;
    max-width: 100%;
}

.ruleta-control-panel {
    background: linear-gradient(135deg, rgba(168,85,247,0.15), rgba(59,130,246,0.15));
    border: 1px solid rgba(168,85,247,0.3);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
}

.ruleta-mode-selector {
    display: flex;
    gap: 10px;
}

.ruleta-mode-btn {
    flex: 1;
    padding: 14px 20px;
    background: rgba(0,0,0,0.3);
    border: 2px solid rgba(168,85,247,0.3);
    border-radius: 12px;
    color: rgba(255,255,255,0.6);
    font-weight: 700;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ruleta-mode-btn:hover {
    border-color: #a855f7;
    color: white;
    background: rgba(168,85,247,0.15);
}

.ruleta-mode-btn.active {
    background: linear-gradient(135deg, #a855f7, #8b5cf6);
    border-color: #a855f7;
    color: white;
    box-shadow: 0 4px 15px rgba(168,85,247,0.4);
}

.ruleta-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
    align-items: start;
    max-width: 100%;
    overflow: hidden;
}

.ruleta-wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.ruleta-canvas-container {
    position: relative;
    width: 100%;
    max-width: min(400px, 100%);
    aspect-ratio: 1 / 1;
}

.ruleta-canvas-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.ruleta-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    color: #fbbf24;
    filter: drop-shadow(0 0 10px rgba(251,191,36,0.6));
    z-index: 10;
    animation: pointerPulse 1.5s ease-in-out infinite;
}

@keyframes pointerPulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.15); }
}

.ruleta-spin-btn {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(168,85,247,0.4);
    display: flex;
    align-items: center;
    gap: 12px;
}

.ruleta-spin-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(168,85,247,0.6);
    filter: brightness(1.1);
}

.ruleta-spin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ruleta-students-section {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 15px;
    max-height: 450px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.ruleta-quick-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}

.ruleta-ctrl-btn {
    padding: 8px 16px;
    background: rgba(168,85,247,0.15);
    border: 1px solid rgba(168,85,247,0.4);
    border-radius: 8px;
    color: #c084fc;
    font-weight: 700;
    font-size: 0.8rem;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ruleta-ctrl-btn:hover {
    background: #a855f7;
    color: white;
}

.ruleta-count {
    margin-left: auto;
    color: #fbbf24;
    font-weight: 800;
    font-size: 0.9rem;
}

.ruleta-students-list {
    overflow-y: auto;
    flex: 1;
}

.ruleta-student-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.ruleta-student-item:hover {
    background: rgba(168,85,247,0.1);
}

.ruleta-student-item.selected {
    background: rgba(168,85,247,0.15);
    border-color: rgba(168,85,247,0.3);
}

.ruleta-student-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #a855f7;
    cursor: pointer;
}

.ruleta-student-number {
    min-width: 30px;
    height: 30px;
    background: rgba(168,85,247,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #c084fc;
}

.ruleta-student-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

/* Ganador - Modal Overlay */
.ruleta-winner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInBackground 0.3s ease-out forwards;
}

.ruleta-winner-modal {
    background: linear-gradient(135deg, #1a1035, #0f172a);
    border: 2px solid rgba(251,191,36,0.5);
    border-radius: 24px;
    padding: 40px 50px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
    overflow: hidden;
    animation: modalPopUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    box-shadow: 0 0 60px rgba(251,191,36,0.15), 0 0 120px rgba(168,85,247,0.1);
}

.winner-icon {
    font-size: 3rem;
    color: #fbbf24;
    margin-bottom: 15px;
}

.winner-name {
    font-size: 2rem;
    font-weight: 900;
    color: #fbbf24;
    text-shadow: 0 0 30px rgba(251,191,36,0.4);
    margin: 0 0 5px 0;
}

.winner-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    margin: 0;
}

.winner-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.winner-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.winner-btn-remove {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239,68,68,0.3);
}

.winner-btn-remove:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239,68,68,0.5);
}

.winner-btn-keep {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 4px 15px rgba(34,197,94,0.3);
}

.winner-btn-keep:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34,197,94,0.5);
}

/* Confetti */
.winner-confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: 50%;
    left: var(--x);
    border-radius: 2px;
    animation: confettiFall 2.5s ease-out var(--delay) forwards;
    transform: rotate(var(--rotation));
    opacity: 0;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: rotate(var(--rotation)) translateY(0) scale(1);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(calc(var(--rotation) + 720deg)) translateY(-200px) scale(0.5);
    }
}

/* Historial */
.ruleta-history {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.ruleta-history-list {
    max-height: 200px;
    overflow-y: auto;
}

.ruleta-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
    background: rgba(255,255,255,0.03);
}

.history-number {
    min-width: 25px;
    height: 25px;
    background: rgba(251,191,36,0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #fbbf24;
}

.history-name {
    flex: 1;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
}

.history-time {
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
}

/* Equipos */
.ruleta-equipos-panel {
    margin-bottom: 25px;
}

.ruleta-equipos-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: start;
    margin-bottom: 20px;
}

.ruleta-equipos-config {
    background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(168,85,247,0.1));
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 16px;
    padding: 20px;
}

.ruleta-equipos-guardados {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.equipos-guardados-item {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}

.equipos-guardados-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    gap: 10px;
}

.equipos-guardados-header:hover {
    background: rgba(168,85,247,0.1);
}

.equipos-guardados-detalle {
    padding: 10px 15px 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.equipos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.equipo-card {
    background: rgba(0,0,0,0.2);
    border: 2px solid;
    border-radius: 16px;
    overflow: hidden;
    animation: entradaElegante 0.5s ease forwards;
}

.equipo-header {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
}

.equipo-header small {
    margin-left: auto;
    font-weight: 600;
    opacity: 0.6;
    font-size: 0.8rem;
}

.equipo-members {
    padding: 10px 15px;
}

.equipo-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.85);
    font-weight: 500;
}

.equipo-member:last-child {
    border-bottom: none;
}

.member-number {
    min-width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
}

/* ============= RESPONSIVE - RULETA ============= */
@media (max-width: 900px) {
    .ruleta-layout {
        grid-template-columns: 1fr;
    }

    .ruleta-equipos-top {
        grid-template-columns: 1fr;
    }

    .ruleta-canvas-container {
        max-width: 320px;
    }

    .ruleta-students-section {
        max-height: 300px;
    }

    .ruleta-control-panel {
        padding: 15px;
    }
}

@media (max-width: 500px) {
    .ruleta-mode-selector {
        flex-direction: column;
    }

    .ruleta-control-panel {
        padding: 12px;
        border-radius: 14px;
    }

    .ruleta-mode-btn {
        padding: 12px 15px;
        font-size: 0.8rem;
        gap: 8px;
    }

    .ruleta-canvas-container {
        max-width: 260px;
    }

    .ruleta-spin-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .ruleta-quick-controls {
        flex-wrap: wrap;
    }

    .ruleta-student-item {
        padding: 8px 10px;
        gap: 8px;
    }

    .ruleta-student-name {
        font-size: 0.85rem;
        word-break: break-word;
    }

    .ruleta-student-number {
        min-width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .winner-name {
        font-size: 1.4rem;
    }

    .winner-actions {
        flex-direction: column;
    }

    .winner-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    .ruleta-winner-modal {
        padding: 25px 20px;
        width: 92%;
    }

    .winner-icon {
        font-size: 2.5rem;
    }

    .equipos-grid {
        grid-template-columns: 1fr;
    }

    .ruleta-equipos-config {
        padding: 15px;
    }

    .ruleta-history {
        padding: 15px;
    }
}
