/* Slide-specific CSS variables */
/* Sidebar layout inherited from shared-sidebar-layout.css */

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 5px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 8px;
}

.tab-btn {
    flex: 1;
    padding: 7px 10px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.tab-btn:hover {
    color: #666;
    background: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
    background: white;
    color: #3379FF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-icon {
    font-size: 0.7rem;
    position: relative;
    top: -2.5px;
}

/* Tab Content */
.tab-content {
    display: none;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    min-height: 0;
}

.tab-content.active {
    display: flex;
}

.section-header {
    font-size: 0.73125rem;
    font-weight: 700;
    color: #3479FF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    padding-bottom: 4px;
    padding-left: 2px;
}

.section-header .icon {
    font-size: 0.975rem;
    position: relative;
    top: 1px;
}

.class-selector-section .section-header .icon {
    top: -1px;
}

/* Class Selector */
.class-selector-section {
    display: flex;
    flex-direction: column;
}

.class-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.class-dropdown-container {
    position: relative;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.class-dropdown-btn {
    width: 100%;
    padding: 7px 12px 7px 8px;
    background: #fafafa;
    color: #333;
    border: 2px solid #EEEEEE;
    border-radius: 10px;
    font-size: 0.7125rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-sizing: border-box;
    height: 36px;
    text-align: left;
}

.class-dropdown-btn .dropdown-icon {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
    color: #667eea;
}

.class-dropdown-btn.dropdown-open .dropdown-icon {
    transform: rotate(180deg);
}

.class-dropdown-btn:hover {
    background: #fff;
    border-color: #3479FF;
}

.class-dropdown-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.class-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    max-height: 390px;
    overflow-y: auto;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.class-dropdown-menu.show {
    display: flex;
}

.class-option {
    padding: 8px 12px 8px 8px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.7125rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 36px;
    line-height: 20px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.class-option:hover {
    background: #f5f5f5;
}

.class-option:active {
    background: #e8e8e8;
}

.class-option.create-new-option {
    color: #3479FF;
    font-weight: 700;
}

.class-dropdown-btn .class-name-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.class-dropdown-btn.loading {
    color: #999;
}

.class-dropdown-btn.loading .dropdown-icon {
    animation: spin-icon 0.8s linear infinite;
}

@keyframes spin-icon {
    to {
        transform: rotate(360deg);
    }
}

.class-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #eee;
    border-radius: 10px;
    background: #fafafa;
    font-size: 0.825rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.class-btn:hover {
    border-color: #3479FF;
    background: #f0f4ff;
}

.delete-class-btn {
    font-size: 0.675rem;
    width: 36px;
    height: 36px;
    box-sizing: border-box;
}

.delete-class-btn:hover {
    border-color: #e74c3c;
    background: #fef2f2;
}

.delete-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.class-name-input {
    margin-top: 10px;
    padding: 7px 8px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 0.7125rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: all 0.2s ease;
    background: #fafafa;
    color: #333;
}

.class-name-input:focus {
    outline: none;
    border-color: #3479FF;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Add Students */
.bulk-section {
    display: flex;
    flex-direction: column;
    margin-top: 8px;
}

.bulk-textarea {
    width: 100%;
    min-height: 82px;
    padding: 8px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 0.7125rem;
    font-family: 'Poppins', sans-serif;
    resize: vertical;
    transition: all 0.2s ease;
    background: #fafafa;
    color: #333;
}

.bulk-textarea:focus {
    outline: none;
    border-color: #3479FF;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.bulk-textarea::placeholder {
    color: #aaa;
}

.bulk-add-btn {
    margin-top: 10px;
    padding: 9px 14px;
    background: #3379FF;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.675rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bulk-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(51, 121, 255, 0.4);
}

.bulk-add-btn:active {
    transform: translateY(0);
}

/* Student List */
.student-list-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: -14px;
}

.student-list-header {
    display: flex;
    width: 100%;
    margin-bottom: 12px;
}

.student-filter-toggle {
    display: flex;
    width: 100%;
    gap: 4px;
    background: #f5f5f5;
    padding: 2px;
    border-radius: 8px;
}

.filter-toggle-btn {
    font-size: 0.6rem;
    font-weight: 600;
    color: #999;
    background: transparent;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    flex: 1;
}

.filter-toggle-btn:hover {
    color: #3379FF;
    background: rgba(51, 121, 255, 0.1);
}

.filter-toggle-btn.active {
    color: #3379FF;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.filter-toggle-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: #DDDDDD;
    color: #656565;
    font-size: 0.55rem;
    font-weight: 600;
    margin-left: 2px;
    line-height: 1;
}

.filter-toggle-btn.active .filter-toggle-count {
    background: #DDDDDD;
    color: #656565;
}

.student-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: #999;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 20px;
}

.student-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 6px;
}

.students-placeholder-image {
    width: 40%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
}

.student-list::-webkit-scrollbar {
    width: 5px;
}

.student-list::-webkit-scrollbar-track {
    background: transparent;
}

.student-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.student-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background: #f8f9fa;
    border-radius: 10px;
    animation: slideIn 0.3s ease;
    border: 1.56px solid #e0e7ff;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

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

.student-item:hover {
    background: #f0f4ff;
    border-color: #e0e7ff;
}

.student-item.hidden {
    background: rgba(248, 249, 250, 0.5);
    border-color: transparent;
}

.student-item.hidden .student-name {
    text-decoration: line-through;
    text-decoration-color: #999;
    text-decoration-thickness: 2px;
    opacity: 0.6;
    color: #999;
}

.student-item.hidden:hover {
    background: #E8E8E8;
    border-color: #CCCCCC;
}

.student-item.hidden .student-item-actions {
    opacity: 1;
}

.student-item.winner {
    background: linear-gradient(135deg, #fff0f3, #ffe8ec);
    border-color: #e94560;
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.2);
}

.student-item.winner .student-name {
    color: #e94560;
    font-weight: 700;
}

.student-info {
    display: flex;
    align-items: center;
}

.student-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.student-name {
    font-weight: 600;
    color: #333;
    font-size: 0.7125rem;
    cursor: text;
    padding: 2px 4px;
    margin: -2px -4px;
    border-radius: 4px;
    outline: none;
    transition: background 0.2s ease;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    width: fit-content;
    overflow-wrap: break-word;
    word-break: break-word;
}

.student-name:hover {
    background: rgba(52, 121, 255, 0.1);
}

.student-name:focus {
    background: #fff;
    box-shadow: 0 0 0 2px #3479FF;
}

.student-item-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.hide-show-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 0.6rem;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.hide-show-btn:hover {
    color: #666;
    background: rgba(0, 0, 0, 0.05);
}

.hide-show-btn .hide-icon {
    width: 11.2px;
    height: 11.2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hide-show-btn .hide-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.student-item.hidden .hide-icon img {
    filter: grayscale(100%) brightness(0.7);
    opacity: 0.8;
}

.remove-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 0.6rem;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.remove-btn:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.remove-btn .remove-icon {
    font-size: 0.825rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Link to Group Randomizer */
.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid #eee;
}

.nav-link:hover {
    background: #fff;
    border-color: #e94560;
    color: #e94560;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    padding-left: 60px;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    height: 100vh;
    z-index: 1;
}

/* Toggle Switch Container */
.toggle-container {
    position: fixed;
    top: 20px;
    right: 40px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.mute-container {
    position: fixed;
    top: 20px;
    left: calc(var(--sidebar-width) + 60px);
    z-index: 50;
    transition: left 0.3s ease;
}

.mute-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

.mute-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.mute-btn .mute-icon {
    font-size: 1.2rem;
}

.mute-btn.muted {
    background: rgba(200, 200, 200, 0.95);
}

.mute-btn.muted .mute-label {
    color: #666;
}

.mute-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.toggle-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch.active {
    background: linear-gradient(135deg, #e94560, #ff6b6b);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
    transform: translateX(24px);
}

.restart-btn {
    padding: 10px 20px;
    background: white;
    color: #333;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    line-height: 1.2;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    box-sizing: border-box;
}

.restart-btn .restart-text {
    margin-left: 6px;
}

.restart-btn.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.restart-btn:hover {
    background: #f5f5f5;
    border: 2px solid #832DC5;
    transform: translateX(0);
}

.restart-btn:active {
    transform: translateX(0);
}

/* Last Student Display */
.last-student-display {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.95), rgba(255, 107, 107, 0.95));
    color: white;
    padding: 16px 32px;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.4);
    z-index: 60;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-align: center;
    backdrop-filter: blur(10px);
}

.last-student-display.show {
    opacity: 1;
    pointer-events: auto;
}

.last-student-display .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.last-student-display .name {
    font-size: 1.8rem;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Last Student Name on Wheel */
.last-student-on-wheel {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 25;
    color: white;
    font-size: 16px;
    font-weight: 800;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-family: 'Poppins', sans-serif;
}

.last-student-on-wheel.show {
    opacity: 1;
}

/* Wheel Container */
.wheel-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    max-height: 100%;
    padding-bottom: 0px;
}

.wheel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: min(120px, calc((100vw - 540px - 80px - 240px) * 0.2), calc((100vh - 280px) * 0.2));
}

/* Pointer/Arrow */
.wheel-pointer {
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%) scaleX(-1);
    z-index: 20;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.wheel-pointer svg {
    width: 72px;
    height: 72px;
}

/* The Wheel */
.wheel {
    width: min(600px, calc((100vw - 350px) * 0.55), calc(100vh - 200px));
    height: min(600px, calc((100vw - 350px) * 0.55), calc(100vh - 200px));
    min-width: 300px;
    min-height: 300px;
    border-radius: 50%;
    position: relative;
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    box-shadow:
        0 0 0 12px rgba(255, 255, 255, 0.15),
        0 0 0 16px rgba(233, 69, 96, 0.3),
        0 0 60px rgba(233, 69, 96, 0.4),
        inset 0 0 40px rgba(0, 0, 0, 0.1);
}

.wheel.spinning {
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(96px, 16%);
    height: min(96px, 16%);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.4),
        inset 0 -3px 10px rgba(255, 255, 255, 0.1);
    font-size: 2rem;
    overflow: hidden;
}

.wheel-center img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.wheel-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.wheel-segment-text {
    font-weight: 800;
    fill: white;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-family: 'Poppins', sans-serif;
}

/* Spin Button */
.spin-btn {
    margin-top: clamp(70px, 7vh, 120px);
    padding: 24px 72px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 60px;
    font-size: 1.68rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 10px 40px rgba(102, 126, 234, 0.4),
        0 0 0 0 rgba(102, 126, 234, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
    flex-shrink: 0;
    line-height: 1.2;
}

.spin-btn::first-letter {
    position: relative;
    top: 3px;
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 15px 50px rgba(102, 126, 234, 0.5),
        0 0 0 0 rgba(102, 126, 234, 0.4);
}

.spin-btn:active:not(:disabled) {
    transform: translateY(0);
}

.spin-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    animation: pulse-btn 1s ease-in-out infinite;
}

@keyframes pulse-btn {

    0%,
    100% {
        box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    }

    50% {
        box-shadow: 0 10px 60px rgba(102, 126, 234, 0.6);
    }
}

/* AI Spinner Character */
.ai-spinner-container {
    position: absolute;
    right: calc(-1 * min(270px, calc((100vw - 350px) * 0.25), calc((100vh - 200px) * 0.45)));
    top: 50%;
    transform: translateY(calc(-40% - 55px));
    width: min(240px, calc((100vw - 350px) * 0.22), calc((100vh - 200px) * 0.4));
    height: min(336px, calc((100vw - 350px) * 0.31), calc((100vh - 200px) * 0.56));
    min-width: 120px;
    min-height: 168px;
    z-index: 15;
}

.ai-spinner-body {
    position: absolute;
    bottom: 0;
    left: -8px;
    width: min(180px, calc((100vw - 350px) * 0.165), calc((100vh - 200px) * 0.3));
    min-width: 90px;
    height: auto;
    z-index: 1;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.ai-spinner-arm {
    position: absolute;
    bottom: min(52px, calc((100vw - 350px) * 0.048), calc((100vh - 200px) * 0.087));
    left: calc(-1 * min(46px, calc((100vw - 350px) * 0.042), calc((100vh - 200px) * 0.077)));
    width: min(84px, calc((100vw - 350px) * 0.077), calc((100vh - 200px) * 0.14));
    min-width: 42px;
    height: auto;
    transform-origin: 100% 50%;
    transform: rotate(30deg);
    z-index: 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.1s ease-out;
}

/* Arm spin animation - only swings forward, no upward movement */
@keyframes armSpin {
    0% {
        transform: rotate(30deg);
    }

    20% {
        transform: rotate(30deg);
    }

    50% {
        transform: rotate(-30deg);
    }

    70% {
        transform: rotate(0deg);
    }

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

.ai-spinner-arm.spinning {
    animation: armSpin 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* AI character idle - no animation, stays still */
.ai-spinner-container.idle {
    transform: translateY(calc(-40% - 55px));
}

/* Excited bounce when spinning */
@keyframes aiExcited {

    0%,
    100% {
        transform: translateY(calc(-40% - 55px));
    }

    25% {
        transform: translateY(calc(-42% - 55px));
    }

    50% {
        transform: translateY(calc(-38% - 55px));
    }

    75% {
        transform: translateY(calc(-41% - 55px));
    }
}

.ai-spinner-container.excited {
    animation: aiExcited 0.4s ease-in-out infinite;
}

/* Winner Display */
.winner-display {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.winner-display.show {
    opacity: 1;
    pointer-events: auto;
}

.winner-content {
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.winner-display.show .winner-content {
    transform: scale(1);
}

.winner-label {
    font-size: 1.5rem;
    color: #ff6b6b;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-bottom: 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.winner-name {
    font-size: 5rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 60px rgba(233, 69, 96, 0.8);
    margin-bottom: 40px;
}

.winner-close-btn {
    padding: 15px 40px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.winner-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Confetti */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    left: 50%;
    top: 50%;
    z-index: 101;
    transform: translate(-50%, -50%);
    animation: confetti-explode 2s ease-out forwards;
}

@keyframes confetti-explode {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(calc(-50% + var(--confetti-x)), calc(-50% + var(--confetti-y))) rotate(720deg);
        opacity: 0;
    }
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
    opacity: 0;
    transition: opacity 0.075s ease-in;
}

.empty-state.visible {
    opacity: 1;
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 20px;
    width: 312.5px;
    height: 312.5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 360px;
    line-height: 1.6;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive */
/* Responsive sidebar width breakpoints inherited from shared-sidebar-layout.css */
@media (max-width: 768px) {
    .main-content {
        padding: 24px 10px;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 20px 8px;
    }

    .toggle-wrapper {
        padding: 8px 12px;
    }

    .toggle-label {
        font-size: 0.75rem;
    }

    .mute-label {
        font-size: 0.75rem;
    }

    .toggle-switch {
        width: 44px;
        height: 24px;
    }

    .toggle-switch::after {
        width: 18px;
        height: 18px;
    }

    .toggle-switch.active::after {
        transform: translateX(20px);
    }

    .restart-btn {
        padding: 8px 16px;
        font-size: 0.75rem;
    }
}

/* Hide AI spinner when wheel reaches minimum size (300px) */
@media (max-width: 900px) {
    .ai-spinner-container {
        display: none;
    }

    .wheel-wrapper {
        margin-right: 0;
    }
}


/* Confirmation Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: #f5f5f5;
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-icon {
    width: 56px;
    height: 56px;
    background: #ffe5e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.modal-icon svg {
    width: 28px;
    height: 28px;
    fill: #dc3545;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d2d2d;
    margin-bottom: 32px;
    font-family: 'Poppins', sans-serif;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.modal-btn-cancel {
    background: #e9e9e9;
    color: #666;
}

.modal-btn-cancel:hover {
    background: #d9d9d9;
}

.modal-btn-confirm {
    background: #dc3545;
    color: white;
}

.modal-btn-confirm:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}
