/* Slide-specific CSS variables */
:root {
    --zoom-scale: 1;
}

.sidebar h1 {
    font-size: 1.125rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: left;
}

.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 #eee;
    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-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);
}

.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);
    }
}

/* 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;
}

.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;
}

/* Keep buttons and tooltips at full opacity even when student is hidden */
.student-item.hidden .student-item-actions {
    opacity: 1;
}


.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;
}

/* Custom tooltips for buttons */

/* Ensure tooltips stay in view - adjust position if needed */
.student-item-actions {
    position: relative;
    overflow: visible;
}

.member {
    overflow: visible;
}

.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: #3479FF;
    background: rgba(102, 126, 234, 0.1);
}

.filter-toggle-btn.active {
    color: #3479FF;
    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-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 0;
}

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

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

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

.student-list::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

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

.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;
}

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

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

    to {
opacity: 1;
transform: translateX(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;
}

.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;
}

/* Group Size Selector */
.group-size-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 11px 4px 11px;
    background: #f8f9fa;
    border-radius: 14px;
    border: 1px solid #eee;
}

.group-size-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.stepper {
    display: flex;
    align-items: center;
    background: #F5F5F5;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    width: 98px;
}

.size-btn {
    width: 30px;
    height: 30px;
    border: none;
    padding: 0;
    box-sizing: border-box;
    background: transparent;
    font-size: 1.21875rem;
    color: #3479FF;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.size-btn:hover {
    background: #E8E8E8;
    color: #3479FF;
}

.size-btn:active {
    background: #DDDDDD;
}

.size-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
    background: transparent;
    opacity: 0.5;
}

.size-btn:disabled:hover {
    background: transparent;
}

.size-input {
    width: 38px;
    height: 30px;
    text-align: center;
    border: none;
    border-left: 2px solid #e5e7eb;
    border-right: 2px solid #e5e7eb;
    background: #fff;
    font-size: 1.03125rem;
    font-weight: 700;
    color: #333333;
    font-family: inherit;
    -moz-appearance: textfield;
}

.size-input::-webkit-outer-spin-button,
.size-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.size-input:focus {
    outline: none;
    background: #f8f9ff;
}

/* Generate Button */
.generate-btn {
    padding: 12px 18px;
    background: linear-gradient(135deg, #832EC5 0%, #B900FF 50%, #FFC700 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.825rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(131, 46, 197, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(131, 46, 197, 0.4);
}

.generate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(131, 46, 197, 0.3);
}

.generate-btn .shuffle-icon {
    width: 1.2rem;
    height: 1.2rem;
    transition: transform 0.6s ease;
    display: inline-block;
    object-fit: contain;
}

.generate-btn:hover .shuffle-icon {
    transform: rotateX(360deg) rotateY(360deg);
}

/* Main Content Area - layout inherited from shared-sidebar-layout.css */
/* Additional main-content styles specific to this slide */

/* Toggle Switch Container */
.toggle-container {
    display: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.toggle-container.show {
    display: flex;
}

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

.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: #832EC5;
}

.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);
}

.reset-points-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;
}

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

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

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

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

.order-by-score-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;
}

.order-by-score-btn .order-by-score-text {
    margin-left: 6px;
}

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

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

.order-by-score-btn:active {
    transform: translateX(0);
}

.top-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

/* Wrapper for top controls to handle wrapping */
.controls-wrapper {
    position: relative;
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    column-gap: 10px;
    row-gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 11px;
    width: 100%;
}

.theme-toggle-container {
    position: relative;
}

.theme-toggle-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;
    line-height: 1.2;
    height: 46px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-shadow: none;
    backdrop-filter: blur(10px);
    width: 160px;
    box-sizing: border-box;
}

.theme-toggle-btn #themeButtonText {
    display: flex;
    align-items: center;
    gap: 0;
}

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

.theme-toggle-btn .dropdown-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

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

.theme-toggle-btn.show {
    display: flex;
}

.theme-toggle-btn:hover {
    background: #f5f5f5;
    border: 2px solid #832DC5;
    box-shadow: none;
}

.theme-toggle-btn:active {
    transform: translateY(0);
}

.theme-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.theme-dropdown.show {
    display: flex;
}

.theme-option {
    padding: 10px 16px;
    padding-left: 13px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    color: #333;
}

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

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

.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;
    line-height: 1.2;
    height: 46px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0;
    box-shadow: none;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.restart-btn .restart-emoji {
    width: 0.84rem;
    height: 0.84rem;
    display: block;
}

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

.restart-btn.show {
    display: flex;
}

.restart-btn:hover {
    background: #f5f5f5;
    border: 2px solid #832DC5;
    box-shadow: none;
}

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

@media (max-width: 768px) {
    .controls-wrapper {
column-gap: 8px;
row-gap: 8px;
margin-bottom: 8px;
align-items: center;
    }

    .top-buttons-container {
gap: 8px;
justify-content: flex-end;
    }

    .toggle-container {
gap: 6px;
    }

    .theme-toggle-btn,
    .restart-btn,
    .reset-points-btn,
    .order-by-score-btn {
padding: 8px 16px;
font-size: 0.75rem;
height: 42px;
    }

    .theme-dropdown {
min-width: 130px;
    }
}

.groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px;
    width: 100%;
    margin-top: 8px;
    align-content: start;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    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;
}

/* Group Cards */
.group-card {
    background: #fff;
    border-radius: calc(10px * var(--zoom-scale));
    padding: calc(13.2px * var(--zoom-scale));
    padding-bottom: calc(13.2px * var(--zoom-scale));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: calc(3px * var(--zoom-scale)) solid transparent;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: calc(7px * var(--zoom-scale));
}

/* Ranking Styles */
.group-card.rank-1 {
    border-color: #FFD700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4), 0 4px 20px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #fff 0%, #fffef0 100%);
}

.group-card.rank-2 {
    border-color: #C0C0C0;
    box-shadow: 0 0 30px rgba(192, 192, 192, 0.4), 0 4px 20px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
}

.group-card.rank-3 {
    border-color: #CD7F32;
    box-shadow: 0 0 30px rgba(205, 127, 50, 0.4), 0 4px 20px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #fff 0%, #fff8f0 100%);
}

.rank-badge {
    background: white;
    border-radius: 50%;
    width: calc(50px * var(--zoom-scale));
    height: calc(50px * var(--zoom-scale));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(2rem * var(--zoom-scale));
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    animation: medalPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 4px 15px rgba(0, 0, 0, 0.2);
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.6), 0 4px 15px rgba(0, 0, 0, 0.2);
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.6), 0 4px 15px rgba(0, 0, 0, 0.2);
}

.rank-label {
    font-size: calc(0.75rem * var(--zoom-scale));
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: calc(4px * var(--zoom-scale)) calc(10px * var(--zoom-scale));
    border-radius: calc(12px * var(--zoom-scale));
    flex-shrink: 0;
}

.rank-label.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.rank-label.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    color: #333;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.rank-label.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    color: white;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4);
}

@keyframes medalPop {
    0% {
transform: scale(0) rotate(-180deg);
opacity: 0;
    }

    50% {
transform: scale(1.2) rotate(10deg);
    }

    100% {
transform: scale(1) rotate(0deg);
opacity: 1;
    }
}

@keyframes popIn {
    from {
opacity: 0;
transform: scale(0.9) translateY(15px);
    }

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

.group-header {
    display: flex;
    align-items: center;
    gap: calc(4.9px * var(--zoom-scale));
    margin-bottom: calc(7px * var(--zoom-scale));
    padding-bottom: 0;
}

.group-emoji {
    font-size: calc(1.05rem * var(--zoom-scale));
    cursor: pointer;
    padding: calc(2.4px * var(--zoom-scale)) calc(4.8px * var(--zoom-scale));
    border-radius: calc(8px * var(--zoom-scale));
    transition: all 0.2s ease;
    user-select: none;
}

.group-emoji:hover {
    background: #f0f4ff;
    transform: scale(1.1);
}

/* Emoji Picker Styles */
.emoji-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.emoji-picker-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.emoji-picker {
    background: white;
    border-radius: 16px;
    padding: 24px 24px 0 24px;
    max-width: 480px;
    width: 90%;
    height: 500px;
    max-height: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

.emoji-picker-overlay.show .emoji-picker {
    transform: scale(1);
}

.emoji-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
}

.emoji-picker-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.emoji-picker-search {
    margin-bottom: 0;
    position: relative;
}

.emoji-picker-search-input {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    background: #fafafa;
    color: #333;
}

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

.emoji-picker-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
    pointer-events: none;
}

.emoji-picker-search-input:focus+.emoji-picker-search-icon {
    color: #3479FF;
}

.emoji-picker-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.emoji-picker-close:hover {
    background: #f5f5f5;
    color: #333;
}

.emoji-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 70px);
    justify-content: center;
    align-content: start;
    gap: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    padding: 0;
    flex: 1;
    min-height: 0;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.emoji-picker-grid::-webkit-scrollbar {
    width: 6px;
}

.emoji-picker-grid::-webkit-scrollbar-track {
    background: transparent;
}

.emoji-picker-grid::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.emoji-picker-item {
    font-size: 2rem;
    padding: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    min-width: 0;
    min-height: 0;
    line-height: 1;
    box-sizing: border-box;
}

.emoji-picker-item:hover {
    background: #f0f4ff;
}

.group-title {
    font-size: calc(0.84rem * var(--zoom-scale));
    font-weight: 700;
    color: #333;
    cursor: text;
    padding: calc(1.2px * var(--zoom-scale)) calc(3.6px * var(--zoom-scale));
    margin: calc(-1.2px * var(--zoom-scale)) calc(-3.6px * var(--zoom-scale));
    border-radius: calc(6px * var(--zoom-scale));
    outline: none;
    transition: background-color 0.2s ease;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    width: fit-content;
    overflow-wrap: break-word;
    word-break: break-word;
}

.group-title:hover {
    background: #f5f5f5;
}

.group-title:focus {
    background: #fff;
    box-shadow: 0 0 0 2px #337AFF;
}

.group-count-container {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: calc(6px * var(--zoom-scale));
}

.group-count {
    font-size: calc(0.525rem * var(--zoom-scale));
    font-weight: 600;
    color: #888;
    background: #f5f5f5;
    padding: calc(2.4px * var(--zoom-scale)) calc(6px * var(--zoom-scale));
    border-radius: calc(20px * var(--zoom-scale));
}

.add-member-btn {
    width: calc(18px * var(--zoom-scale));
    height: calc(18px * var(--zoom-scale));
    border-radius: calc(4px * var(--zoom-scale));
    border: none;
    background: #3479FF;
    color: white;
    font-size: calc(0.7rem * var(--zoom-scale));
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    margin-left: 1px;
    position: relative;
}

.add-member-btn::before {
    content: 'Add Students';
    position: absolute;
    right: calc(100% + 8px);
    background: black;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.add-member-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(52, 121, 255, 0.4);
}

.add-member-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

.add-member-btn:active {
    transform: scale(0.95);
}

/* Add Member Popup Styles */
.add-member-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.add-member-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.add-member-popup {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.add-member-overlay.show .add-member-popup {
    transform: scale(1);
}

.add-member-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-right: 40px;
}

.add-member-title {
    font-size: 0.825rem;
    font-weight: 700;
    color: #333;
}

.add-member-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: absolute;
    top: 20px;
    right: 24px;
}

.add-member-close:hover {
    background: #f5f5f5;
    color: #333;
}

.add-member-input-section {
    margin-bottom: 16px;
}

.add-member-textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px;
    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;
}

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

.add-member-textarea::placeholder {
    color: #aaa;
}

.add-member-submit-container {
    display: flex;
    align-items: center;
}

.add-member-submit {
    flex: 1;
    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;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    height: 36px;
}

.add-member-icon {
    font-size: 1.2rem;
    font-weight: 700;
}

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

.add-member-submit:active {
    transform: translateY(0);
}

.add-member-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0px 0 8px 0;
    color: #999;
    font-size: 0.8rem;
    font-weight: 600;
}

.add-member-divider::before,
.add-member-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}

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

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

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

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

.add-member-student-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

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

.add-member-student-item.in-group {
    opacity: 0.5;
    cursor: not-allowed;
}

.add-member-student-item.in-group:hover {
    background: #f8f9fa;
    border-color: transparent;
}

.add-member-student-name {
    font-weight: 600;
    color: #333;
    font-size: 0.7125rem;
}

.add-member-student-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 12px;
}

.add-member-student-item.in-group .add-member-student-status {
    background: #e8f5e9;
    color: #4caf50;
}

.add-member-empty {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 0.9rem;
}

.group-points-container {
    margin-top: auto;
    padding-top: 9.6px;
    border-top: 2px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 7.2px;
    align-items: stretch;
}

.group-points-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
}

.rank-widget {
    position: absolute;
    bottom: -11.125px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12.808125px;
    z-index: 10;
}

.rank-widget.hidden {
    visibility: hidden;
    opacity: 0;
}

.rank-widget .rank-label {
    margin: 0;
    padding: 3.8424375px 10.2465px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 16.01015625px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    font-size: 0.512325rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.64040625px;
    color: #333;
}

.rank-widget .rank-label .rank-emoji {
    font-size: 0.9285890625em;
    display: inline-block;
}

.rank-widget.rank-2 .rank-label {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.rank-widget.rank-3 .rank-label {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4);
    color: white;
}

.rank-widget .rank-badge {
    margin: 0;
    width: 32.0203125px;
    height: 32.0203125px;
    font-size: 1.2808125rem;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 0 12.808125px rgba(255, 215, 0, 0.6), 0 2.561625px 9.60609375px rgba(0, 0, 0, 0.2);
}

.rank-widget.rank-2 .rank-badge {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    box-shadow: 0 0 12.808125px rgba(192, 192, 192, 0.6), 0 2.561625px 9.60609375px rgba(0, 0, 0, 0.2);
}

.rank-widget.rank-3 .rank-badge {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    box-shadow: 0 0 12.808125px rgba(205, 127, 50, 0.6), 0 2.561625px 9.60609375px rgba(0, 0, 0, 0.2);
}

.group-points-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.group-points-label {
    font-size: calc(0.8211rem * var(--zoom-scale));
    font-weight: 700;
    color: #832EC5;
    flex-shrink: 0;
}

.group-points-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: calc(4.8px * var(--zoom-scale));
    min-width: 0;
}

.group-points-display .number-stepper {
    width: calc(98px * var(--zoom-scale));
    border-radius: calc(10px * var(--zoom-scale));
}

.group-points-display .stepper-btn {
    width: calc(30px * var(--zoom-scale));
    height: calc(30px * var(--zoom-scale));
    font-size: calc(1.21875rem * var(--zoom-scale));
}

.group-points-display .stepper-input {
    width: calc(38px * var(--zoom-scale));
    height: calc(30px * var(--zoom-scale));
    font-size: calc(1.03125rem * var(--zoom-scale));
    color: #832EC5;
}

.group-members {
    display: flex;
    flex-direction: column;
    gap: calc(4.8px * var(--zoom-scale));
    flex: 1;
    min-height: 0;
    margin-bottom: calc(9.6px * var(--zoom-scale));
}

.member {
    display: flex;
    align-items: center;
    gap: calc(7.2px * var(--zoom-scale));
    padding: calc(6px * var(--zoom-scale)) calc(7.2px * var(--zoom-scale));
    background: #f8f9fa;
    border-radius: calc(10px * var(--zoom-scale));
    transition: all 0.2s ease;
    border: 1px solid transparent;
    position: relative;
}

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

/* Drag tooltip */
.member-tooltip {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.member-tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #000;
}

.member:hover .member-tooltip {
    opacity: 1;
}

/* Hide drag tooltip when hovering on hide button */
.member-hide-btn:hover~.member-tooltip {
    opacity: 0;
}

/* Hide drag tooltip when hovering on menu button or when dropdown is open */
.member-menu-container:hover~.member-tooltip {
    opacity: 0;
}

.member:has(.member-dropdown.show) .member-tooltip {
    opacity: 0 !important;
}

/* Hide drag tooltip when dragging */
.member.dragging .member-tooltip {
    opacity: 0 !important;
}

/* Hide drag tooltip when editing the member name */
.member:has(.member-name:focus) .member-tooltip {
    opacity: 0 !important;
}

.member-avatar {
    width: calc(36px * var(--zoom-scale));
    height: calc(36px * var(--zoom-scale));
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: calc(8px * var(--zoom-scale));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: calc(0.85rem * var(--zoom-scale));
}

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

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

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

/* Color variations for groups */
.group-card:nth-child(6n+1) .member-avatar {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.group-card:nth-child(6n+2) .member-avatar {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.group-card:nth-child(6n+3) .member-avatar {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.group-card:nth-child(6n+4) .member-avatar {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.group-card:nth-child(6n+5) .member-avatar {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

.group-card:nth-child(6n+6) .member-avatar {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    color: #555;
}

/* Drag and Drop Styles */
.member[draggable="true"] {
    cursor: grab;
}

.member[draggable="true"]:active {
    cursor: grabbing;
}

.member.dragging {
    opacity: 0.5;
    transform: scale(0.98);
    background: #e8ecff;
    border: 2px dashed #667eea;
}

.group-card.drag-over {
    background: #f0f4ff;
    border: 2px dashed #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.group-card.drag-over .group-members {
    min-height: 60px;
}

.member-drag-handle {
    color: #333;
    margin-right: 2.4px;
    font-size: 0.91rem;
    cursor: grab;
    transition: color 0.2s ease;
}

.member:hover .member-drag-handle {
    color: #3479FF;
}

.member-hide-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;
    margin-left: auto;
    flex-shrink: 0;
    position: relative;
}

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

.hide-tooltip {
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: #000;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.hide-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid #000;
}

.member-hide-btn:hover .hide-tooltip {
    opacity: 1;
}

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

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

/* Member menu container */
.member-menu-container {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}

/* Member menu button (triple dot) */
.member-menu-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    line-height: 1;
}

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

.member-menu-btn.active {
    color: #3479FF;
    background: rgba(52, 121, 255, 0.1);
}

/* Member dropdown menu */
.member-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 4px;
    display: none;
    flex-direction: column;
    gap: 2px;
    min-width: 120px;
    z-index: 100;
}

.member-dropdown.show {
    display: flex;
}

.member-dropdown-option {
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    color: #333;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-dropdown-option .dropdown-icon-img {
    width: 14px;
    height: 14px;
    min-width: 14px;
    object-fit: contain;
    filter: brightness(0);
}

.member-dropdown-option .dropdown-icon-text {
    font-size: 0.9rem;
    color: #000;
    width: 14px;
    min-width: 14px;
    text-align: center;
    display: inline-block;
}

.member-dropdown-option .dropdown-icon-text.pen-icon {
    font-size: 0.995rem;
    transform: rotate(135deg);
}

.member-dropdown-option:hover {
    background: #f5f5f5;
}

.member-dropdown-option:active {
    background: #e8e8e8;
}

.member-dropdown-option.remove {
    color: #333;
}

.member-dropdown-option.remove:hover {
    background: #f5f5f5;
}

.drop-hint {
    padding: 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px dashed #667eea;
    border-radius: 10px;
    text-align: center;
    color: #3479FF;
    font-weight: 600;
    font-size: 0.85rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
opacity: 0.6;
    }

    50% {
opacity: 1;
    }
}

/* Responsive - sidebar width breakpoints inherited from shared-sidebar-layout.css */
@media (max-width: 640px) {

    .controls-wrapper {
column-gap: 6px;
row-gap: 6px;
    }

    .toggle-container {
gap: 6px;
    }

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

    .toggle-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);
    }

    .theme-toggle-btn,
    .restart-btn,
    .reset-points-btn,
    .order-by-score-btn {
padding: 8px 16px;
font-size: 0.75rem;
height: 42px;
    }

    .rank-badge {
width: 40px;
height: 40px;
font-size: 1.5rem;
    }

    .rank-label {
font-size: 0.65rem;
padding: 3px 8px;
    }

    .rank-widget {
gap: 8.9656875px;
    }

    .rank-widget .rank-label {
font-size: 0.448284375rem;
padding: 3.20203125px 7.684875px;
    }

    .rank-widget .rank-badge {
width: 26.8970625px;
height: 26.8970625px;
font-size: 1.02465rem;
    }
}

/* Toast notification */
.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);
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.toast-message {
    flex: 1;
}

.toast-undo {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.toast-undo:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.toast-undo:active {
    transform: scale(0.95);
}

/* Confirm Modal Styles */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(4px);
}

.confirm-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.confirm-modal {
    background: white;
    border-radius: 16px;
    padding: 28px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.confirm-overlay.show .confirm-modal {
    transform: scale(1);
}

.confirm-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #fee;
    border-radius: 50%;
    color: #d32f2f;
}

.confirm-icon-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.confirm-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin: 0;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.confirm-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-btn-cancel {
    background: #f5f5f5;
    color: #333;
}

.confirm-btn-cancel:hover {
    background: #e8e8e8;
}

.confirm-btn-delete {
    background: #d32f2f;
    color: white;
}

.confirm-btn-delete:hover {
    background: #b71c1c;
}

.confirm-btn:active {
    transform: scale(0.97);
}

/* Zoom Control */
.zoom-control {
    position: fixed;
    bottom: 5px;
    right: 10px;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    height: 32px;
    width: 180px;
    overflow: hidden;
}

.zoom-control-inner {
    display: flex;
    align-items: center;
    background: #FAFAFA;
    height: 100%;
    width: 100%;
    border-radius: 6px;
}

.zoom-control-section {
    display: flex;
    align-items: center;
    height: 100%;
}

.zoom-info-section {
    padding: 0 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.zoom-control .zoom-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    color: #000;
}

.zoom-control .zoom-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.zoom-percentage {
    font-size: 12px;
    font-weight: 500;
    color: #000;
    min-width: 34px;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.zoom-divider {
    width: 2px;
    height: 100%;
    background: #E0E0E0;
}

.zoom-button-wrapper {
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.zoom-button-wrapper:hover:not(.disabled) {
    background: rgba(0, 0, 0, 0.05);
}

.zoom-button-wrapper.disabled {
    cursor: default;
}

.zoom-control button {
    width: 18px;
    height: 18px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    color: #3379FF;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    pointer-events: none;
}

.zoom-button-wrapper.disabled button {
    color: #E0E0E0;
}

.zoom-slider-container {
    position: relative;
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0 8px;
}

.zoom-slider-track {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 1px;
    background: #E0E0E0;
    border-radius: 0.5px;
}

.zoom-slider-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #000;
    border-radius: 50%;
    z-index: 1;
    transition: all 0.1s ease;
    left: 50%;
    transform: translateX(-50%);
    cursor: grab;
}

.zoom-slider-dot:active {
    cursor: grabbing;
    transform: translateX(-50%) scale(1.1);
}
