/* ============================================
   RANDOMIZER V2 STYLES
   Tall thin modal with spinning circle animation
   ============================================ */

/* Modal Dialog Width */
#randomizerV2Modal .modal-dialog {
    max-width: 800px !important;
    width: 90% !important;
}

/* Modal Content */
.randomizer-v2-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    background: var(--glass-bg, rgba(255, 255, 255, 0.4));
    backdrop-filter: var(--glass-blur, blur(12px));
    -webkit-backdrop-filter: var(--glass-blur, blur(12px));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.2));
    min-height: 1000px;
}

.randomizer-v2-content .modal-header {
    border-radius: 20px 20px 0 0;
    border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.2));
}

/* Spinner Container */
.randomizer-v2-spinner-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Spinner */
.randomizer-v2-spinner {
    position: relative;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.3);
    transition: all 0.3s ease;
}

/* Spinning Circle */
.spinner-circle {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Spinner Inner */
.spinner-inner {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Student Image */
.spinner-student-image {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 3px solid var(--glass-border, rgba(255, 255, 255, 0.3));
    transition: all 0.1s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Image Cycling Animation - removed spinning animations */
.randomizer-v2-spinner.spinning .spinner-student-image {
    animation: none;
}

.randomizer-v2-spinner.slowing .spinner-student-image {
    animation: none;
}

.randomizer-v2-spinner.stopped {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(var(--primary-rgb), 0.6);
}

.randomizer-v2-spinner.stopped .spinner-student-image {
    animation: none;
}

/* Student Info */
.randomizer-v2-student-info {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.randomizer-v2-student-info h4 {
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    transition: all 0.3s ease;
    text-align: center;
    word-wrap: break-word;
    max-width: 100%;
}

.randomizer-v2-student-info h4.selected {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
    animation: selectedGlow 1s ease-in-out infinite alternate;
}

@keyframes selectedGlow {
    0% { 
        text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
        transform: scale(1);
    }
    100% { 
        text-shadow: 0 0 20px rgba(var(--primary-rgb), 0.8);
        transform: scale(1.02);
    }
}

.randomizer-v2-student-info p {
    font-size: 0.9rem;
    margin: 0;
    transition: all 0.3s ease;
}

/* Status */
.randomizer-v2-status {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    min-height: 30px;
}

.randomizer-v2-status span {
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.randomizer-v2-status .selected-text {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .randomizer-v2-content {
    background: rgba(var(--dark-bg-rgb), 0.4);
}

[data-theme="dark"] .spinner-circle {
    background: var(--dark-bg);
    border-color: var(--primary-color);
}

[data-theme="dark"] .spinner-student-image {
    border-color: var(--glass-border, rgba(255, 255, 255, 0.2));
}

/* Responsive Design */
@media (max-width: 576px) {
    .randomizer-v2-spinner-container {
        width: 320px;
        height: 320px;
    }
    
    .randomizer-v2-spinner {
        width: 280px;
        height: 280px;
    }
    
    .spinner-circle {
        width: 240px;
        height: 240px;
    }
    
    .spinner-inner {
        width: 200px;
        height: 200px;
    }
    
    .spinner-student-image {
        width: 120px;
        height: 120px;
    }
    
    .randomizer-v2-content {
        min-height: 800px;
    }
}

/* Loading State */
.randomizer-v2-spinner.loading .spinner-student-image {
    opacity: 0.7;
    filter: blur(1px);
}

.randomizer-v2-spinner.loading .spinner-circle {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    animation: loadingPulse 1s ease-in-out infinite alternate;
}

@keyframes loadingPulse {
    0% { 
        background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
        opacity: 0.8;
    }
    100% { 
        background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
        opacity: 1;
    }
}
