/* Existing styles remain unchanged */

/* Default Word Set Controls */
.default-word-set-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
}

.default-set-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.default-set-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.default-set-name {
    font-size: 0.9rem;
    color: #2563eb;
    font-weight: 600;
    background: #eff6ff;
    padding: 4px 8px;
    border-radius: 4px;
}

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

.default-set-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    color: #374151;
}

.default-set-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Enhanced Class and Student Cards */
.class-card, .student-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.class-card:hover, .student-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
    border-color: #3b82f6;
}

/* Add a subtle left border accent for students */
.student-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #3b82f6, #1d4ed8);
    border-radius: 0 2px 2px 0;
}

/* Add a subtle left border accent for classes */
.class-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #10b981, #059669);
    border-radius: 0 2px 2px 0;
}

.class-header, .student-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.class-info h4, .student-info h4 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.class-info p, .student-info p {
    margin: 0 0 8px 0;
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

.class-stats, .student-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 0.85rem;
    color: #374151;
    background: #f8fafc;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
}

.class-actions, .student-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Student and Assignment Tags */
.class-students, .student-assignments {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f1f5f9;
}

.class-students h5, .student-assignments h5 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: #374151;
    font-weight: 600;
}

.student-tags, .assignment-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.student-tag, .assignment-tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #c7d2fe;
    transition: all 0.2s ease;
}

.student-tag:hover, .assignment-tag:hover {
    background: #c7d2fe;
    transform: translateY(-1px);
}

.student-tag.has-assignment {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.assignment-tag {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

/* Enhanced visual separation for student cards specifically */
.enhanced-student-card {
    background: white !important;
    border: 8px solid #dc2626 !important; /* Very thick red border */
    border-radius: 24px !important;
    padding: 0 !important;
    margin: 30px 0 !important; /* Large margin for separation */
    box-shadow: 
        0 12px 40px rgba(220, 38, 38, 0.25) !important,
        0 6px 20px rgba(220, 38, 38, 0.15) !important,
        inset 0 2px 0 rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
    position: relative !important;
    display: block !important;
    min-height: 350px !important; /* Ensure substantial height */
}

.enhanced-student-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 
        0 24px 60px rgba(220, 38, 38, 0.3) !important,
        0 12px 30px rgba(220, 38, 38, 0.2) !important,
        inset 0 2px 0 rgba(255, 255, 255, 0.2) !important;
    border-color: #b91c1c !important; /* Darker red on hover */
}

/* Add a very obvious inner border for students */
.enhanced-student-card::after {
    content: '' !important;
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    right: 15px !important;
    bottom: 15px !important;
    border: 6px solid #fbbf24 !important; /* Thick yellow inner border */
    border-radius: 16px !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* Make sure the content is above the inner border */
.enhanced-student-card .card-header-enhanced,
.enhanced-student-card .card-content-section,
.enhanced-student-card .card-actions-enhanced {
    position: relative !important;
    z-index: 2 !important;
}

/* Add a colored top stripe for extra visibility */
.enhanced-student-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 15px !important;
    background: linear-gradient(90deg, #dc2626, #f97316, #fbbf24) !important;
    z-index: 3 !important;
}

/* Ensure grid spacing is large enough */
.students-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

/* Make sure each student card is clearly separated */
.students-grid .enhanced-student-card {
    margin-bottom: 50px !important;
}

/* Add visual separator lines between students */
.enhanced-student-card + .enhanced-student-card::before {
    content: '' !important;
    position: absolute !important;
    top: -40px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 80% !important;
    height: 4px !important;
    background: linear-gradient(90deg, transparent, #dc2626, transparent) !important;
    z-index: 0 !important;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.section-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.empty-state p {
    margin-bottom: 16px;
    font-size: 1rem;
}

/* Lists */
.classes-list, .students-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .class-header, .student-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .class-actions, .student-actions {
        align-self: flex-start;
    }
    
    .default-set-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .default-set-controls .btn-small {
        width: 100%;
    }
    
    .class-stats, .student-stats {
        flex-direction: column;
        gap: 8px;
    }
}

/* Enhanced Section Headers */
.section-header-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-title-group h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.section-count {
    background: #3b82f6;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-input {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    background: white;
    color: #374151;
    min-width: 200px;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.filter-select {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    background: white;
    color: #374151;
    min-width: 150px;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Enhanced Card Layouts */
.classes-grid, .students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* Give students even more spacing for better visual separation */
.students-grid {
    gap: 20px;
    margin-bottom: 30px;
}

.enhanced-class-card, .enhanced-student-card {
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 0;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    overflow: hidden;
    position: relative;
    margin-bottom: 16px;
}

.enhanced-class-card:hover, .enhanced-student-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 2px 6px rgba(0, 0, 0, 0.06);
    border-color: #1d4ed8;
}

.enhanced-class-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.enhanced-student-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #059669);
}

/* Remove the inner border for students to save space */
.enhanced-student-card::after {
    display: none;
}

/* Compact card headers */
.card-header-enhanced {
    padding: 16px 20px 12px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.card-title-section {
    margin-bottom: 12px;
}

.card-title {
    margin: 0 0 6px 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-description {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.3;
}

.card-stats-grid {
    display: flex;
    gap: 8px;
}

.stat-box {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    min-width: 60px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.stat-number {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.students-stat .stat-number { color: #3b82f6; }
.assignments-stat .stat-number { color: #8b5cf6; }
.individual-stat .stat-number { color: #10b981; }
.class-stat .stat-number { color: #f59e0b; }
.total-stat .stat-number { color: #ef4444; }

/* Card Content */
.card-content-section {
    padding: 16px 20px;
}

.default-word-set-enhanced {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.setting-label {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 600;
}

.setting-value {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 8px;
}

.setting-value.has-value {
    background: #dcfce7;
    color: #166534;
}

.setting-value.no-value {
    background: #fef3c7;
    color: #92400e;
}

.setting-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.enhanced-select {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    color: #374151;
}

.enhanced-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Assignment Sections */
.assignments-section {
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.assignments-section.class-assignments {
    border-left: 3px solid #3b82f6;
}

.assignments-section.individual-assignments {
    border-left: 3px solid #10b981;
}

.assignments-section.empty {
    border-style: dashed;
    border-color: #d1d5db;
}

.section-header-mini {
    background: #f8fafc;
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title-mini {
    margin: 0;
    font-size: 0.9rem;
    color: #374151;
    font-weight: 600;
}

.assignment-count {
    font-size: 0.75rem;
    color: #64748b;
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
}

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

.btn-toggle {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.assignments-container {
    padding: 12px;
}

/* Assignment Items */
.assignment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    transition: all 0.2s ease;
}

.assignment-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.assignment-item.class, .assignment-item.class-inherited {
    border-left: 3px solid #3b82f6;
    background: #eff6ff;
}

.assignment-item.individual {
    border-left: 3px solid #10b981;
    background: #f0fdf4;
}

.assignment-main {
    flex: 1;
}

.assignment-name {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.assignment-icon {
    font-size: 1rem;
}

.assignment-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.word-count {
    background: #e2e8f0;
    color: #64748b;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.assignment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.assignment-date {
    font-size: 0.8rem;
    color: #64748b;
}

.assignment-type-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.assignment-type-badge.class, .assignment-type-badge.class-inherited {
    background: #dbeafe;
    color: #1e40af;
}

.assignment-type-badge.individual {
    background: #dcfce7;
    color: #166534;
}

.assignment-actions {
    display: flex;
    gap: 4px;
}

.btn-tiny {
    background: none;
    border: 1px solid #d1d5db;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-tiny:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-tiny.btn-edit {
    color: #3b82f6;
    border-color: #3b82f6;
}

.btn-tiny.btn-edit:hover {
    background: #3b82f6;
    color: white;
}

.btn-tiny.btn-delete {
    color: #ef4444;
    border-color: #ef4444;
}

.btn-tiny.btn-delete:hover {
    background: #ef4444;
    color: white;
}

/* More Indicators */
.more-indicator {
    text-align: center;
    padding: 12px;
    background: #f8fafc;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    margin-top: 8px;
}

.more-text {
    display: block;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.more-hint {
    display: block;
    color: #9ca3af;
    font-size: 0.8rem;
    font-style: italic;
}

/* Students Section */
.students-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

/* Student chips container - new inline approach */
.students-chips-container {
    line-height: 1.6;
    margin-top: 8px;
}

.student-chip-inline {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 3px 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    white-space: nowrap;
    vertical-align: top;
}

.student-chip-inline:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.student-chip-inline.has-assignments {
    background: #dcfce7;
    border-color: #10b981;
    color: #166534;
}

.student-chip-inline .student-name {
    font-weight: 500;
    margin-right: 4px;
}

.student-chip-inline .student-assignment-count {
    background: #3b82f6;
    color: white;
    padding: 1px 4px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
    display: inline-block;
}

.student-chip-inline.has-assignments .student-assignment-count {
    background: #10b981;
}

/* Empty States */
.empty-assignments {
    text-align: center;
    padding: 24px;
    color: #64748b;
}

.empty-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
    opacity: 0.5;
}

.empty-text {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 12px;
    color: #64748b;
}

/* Card Actions */
.card-actions-enhanced {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.btn-enhanced {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-enhanced:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-enhanced.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-enhanced.btn-primary:hover {
    background: #2563eb;
}

.btn-enhanced.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-enhanced.btn-secondary:hover {
    background: #4b5563;
}

.btn-enhanced.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-enhanced.btn-danger:hover {
    background: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-header-enhanced {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .section-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .search-input, .filter-select {
        min-width: auto;
        width: 100%;
    }
    
    .classes-grid, .students-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .card-stats-grid {
        flex-direction: column;
        gap: 8px;
    }
    
    .setting-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .assignment-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .assignment-actions {
        justify-content: flex-end;
    }
    
    .card-actions-enhanced {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-enhanced {
        justify-content: center;
    }
}

/* Bulk Selection Styles */
.bulk-actions-bar {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.bulk-actions-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.bulk-actions-right {
    display: flex;
    gap: 12px;
}

.bulk-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #92400e;
}

.bulk-select-all input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.selected-count {
    background: #f59e0b;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.btn-bulk {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-bulk:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-bulk.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-bulk.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Selection Mode Styles */
.enhanced-class-card.selection-mode,
.enhanced-student-card.selection-mode {
    position: relative;
    padding-left: 60px;
}

.selection-checkbox {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.selection-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.enhanced-class-card.selection-mode:has(input:checked),
.enhanced-student-card.selection-mode:has(input:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

/* Delete All Buttons */
.btn-danger-small {
    background: #ef4444;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger-small:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

/* Assignment Controls Enhancement */
.assignment-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive Design for Bulk Actions */
@media (max-width: 768px) {
    .bulk-actions-bar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .bulk-actions-left {
        justify-content: space-between;
    }
    
    .bulk-actions-right {
        justify-content: center;
    }
    
    .enhanced-class-card.selection-mode,
    .enhanced-student-card.selection-mode {
        padding-left: 20px;
        padding-top: 60px;
    }
    
    .selection-checkbox {
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* MAXIMUM VISUAL SEPARATION - NEW APPROACH */
/* Override all existing styles with background-based separation */

.students-grid .enhanced-student-card {
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%) !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 30px !important;
    margin: 40px 0 !important;
    box-shadow: 
        0 0 0 6px #dc2626,
        0 0 0 12px #fbbf24,
        0 20px 40px rgba(220, 38, 38, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    position: relative !important;
    transform: scale(1) !important;
    transition: all 0.3s ease !important;
}

.students-grid .enhanced-student-card:hover {
    transform: scale(1.02) !important;
    box-shadow: 
        0 0 0 8px #dc2626,
        0 0 0 16px #fbbf24,
        0 25px 50px rgba(220, 38, 38, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.students-grid .enhanced-student-card::before {
    content: '👤 STUDENT DATA' !important;
    position: absolute !important;
    top: -15px !important;
    left: 20px !important;
    background: #dc2626 !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
    letter-spacing: 1px !important;
    z-index: 10 !important;
}

.students-grid .enhanced-student-card::after {
    content: '' !important;
    position: absolute !important;
    top: -5px !important;
    left: -5px !important;
    right: -5px !important;
    bottom: -5px !important;
    background: linear-gradient(45deg, #dc2626, #fbbf24, #dc2626, #fbbf24) !important;
    background-size: 400% 400% !important;
    border-radius: 25px !important;
    z-index: -1 !important;
    animation: gradientShift 3s ease infinite !important;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Add spacing between student cards */
.students-grid .enhanced-student-card + .enhanced-student-card {
    margin-top: 60px !important;
}

/* Make the student name more prominent */
.students-grid .enhanced-student-card .card-title {
    background: linear-gradient(135deg, #dc2626, #fbbf24) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-size: 1.8rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin-bottom: 20px !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1) !important;
}

/* Add alternating background colors for even more separation */
.students-grid .enhanced-student-card:nth-child(even) {
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%) !important;
    box-shadow: 
        0 0 0 6px #2563eb,
        0 0 0 12px #10b981,
        0 20px 40px rgba(37, 99, 235, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.students-grid .enhanced-student-card:nth-child(even)::before {
    background: #2563eb !important;
}

.students-grid .enhanced-student-card:nth-child(even)::after {
    background: linear-gradient(45deg, #2563eb, #10b981, #2563eb, #10b981) !important;
    background-size: 400% 400% !important;
}

.students-grid .enhanced-student-card:nth-child(even):hover {
    box-shadow: 
        0 0 0 8px #2563eb,
        0 0 0 16px #10b981,
        0 25px 50px rgba(37, 99, 235, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* Force grid layout with large gaps */
.students-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 80px !important;
    padding: 40px 0 !important;
}

/* Add section dividers */
.students-grid .enhanced-student-card:not(:last-child)::after {
    content: '' !important;
    position: absolute !important;
    bottom: -40px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 200px !important;
    height: 4px !important;
    background: linear-gradient(90deg, transparent, #dc2626, transparent) !important;
    border-radius: 2px !important;
    z-index: 5 !important;
}

/* FORCE MAXIMUM VISUAL SEPARATION - FINAL OVERRIDE */
.maximum-separation-card {
    margin: 50px 0 !important;
    padding: 40px !important;
    border-radius: 25px !important;
    position: relative !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.maximum-separation-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 100px !important;
    padding: 50px 20px !important;
    width: 100% !important;
}

.maximum-separation-card .card-title {
    font-size: 2rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 3px !important;
    margin-bottom: 25px !important;
    text-align: center !important;
}

/* Ensure no other styles interfere */
.students-grid .enhanced-student-card {
    margin: 60px 0 !important;
    padding: 35px !important;
}

.students-grid {
    gap: 120px !important;
    padding: 60px 0 !important;
}

/* Main students container - override for individual student cards */
#studentsContainer .students-grid,
.students-grid.maximum-separation-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 20px 0 !important;
}

.students-grid {
    gap: 120px !important;
    padding: 60px 0 !important;
}

/* Folder Management Styles */
.folder-card-rectangular {
    background: white;
    border: 3px solid #3b82f6;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.folder-card-rectangular:hover {
    border-color: #1d4ed8;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25), 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.folder-card-rectangular::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(to bottom, #3b82f6, #1d4ed8);
    border-radius: 0 3px 3px 0;
}

.folder-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.folder-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.folder-icon {
    font-size: 2rem;
    line-height: 1;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
}

.folder-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.folder-count {
    font-size: 0.9rem;
    color: #1d4ed8;
    font-weight: 600;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #93c5fd;
}

.folder-description {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.5;
    font-weight: 500;
}

.folder-wordsets-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    min-height: 36px;
    align-items: flex-start;
}

.wordset-name-tag {
    color: #374151;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid #d1d5db;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wordset-name-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.empty-folder-text {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.95rem;
    padding: 12px 0;
    font-weight: 500;
}

.folder-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.folder-navigation {
    grid-column: 1/-1;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    border: 2px solid #cbd5e1;
}

.folder-navigation button {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    cursor: pointer;
}

.folder-navigation button:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.folder-navigation h3 {
    margin: 16px 0 8px 0;
    color: #1e293b;
    font-size: 1.6rem;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.folder-navigation p {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

/* Folder management header */
.folder-management-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: none;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 25px rgba(30, 41, 59, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.folder-management-header h3 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.folder-management-header p {
    margin: 8px 0 0 0;
    color: #cbd5e1;
    font-size: 1rem;
    font-weight: 500;
}

.folder-management-header .btn-secondary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.folder-management-header .btn-secondary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Legacy folder card styles - keep for backward compatibility */
.folder-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.folder-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.folder-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #f59e0b, #d97706);
    border-radius: 0 2px 2px 0;
}

.folder-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.folder-info {
    flex: 1;
}

.folder-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.word-set-preview {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

.more-sets {
    background: #eff6ff;
    color: #2563eb;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #bfdbfe;
}

.section-divider {
    border-top: 2px solid #e2e8f0;
    padding-top: 20px;
    margin-top: 20px;
}

.section-divider h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.student-chip.has-assignments .student-assignment-count {
    background: #10b981;
}

/* NEW INLINE STUDENT CHIPS - COMPACT APPROACH */
.students-chips-container {
    line-height: 1.6;
    margin-top: 8px;
}

.student-chip-inline {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 3px 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    white-space: nowrap;
    vertical-align: top;
}

.student-chip-inline:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.student-chip-inline.has-assignments {
    background: #dcfce7;
    border-color: #10b981;
    color: #166534;
}

.student-chip-inline .student-name {
    font-weight: 500;
    margin-right: 4px;
}

.student-chip-inline .student-assignment-count {
    background: #3b82f6;
    color: white;
    padding: 1px 4px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
    display: inline-block;
}

.student-chip-inline.has-assignments .student-assignment-count {
    background: #10b981;
}

/* Word Set Preview Tooltip Styles */
.wordset-preview-tooltip {
    position: fixed;
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25), 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    max-width: 350px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.wordset-preview-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.tooltip-header strong {
    color: #1e293b;
    font-size: 1rem;
    font-weight: 700;
}

.tooltip-count {
    color: #3b82f6;
    font-size: 0.85rem;
    font-weight: 600;
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 6px;
}

.tooltip-words {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.tooltip-word {
    background: #f1f5f9;
    color: #374151;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.tooltip-more {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #fbbf24;
    font-style: italic;
}

/* Sentences display styles */
.student-sentences-group {
    margin-bottom: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.student-name {
    background: #f8fafc;
    margin: 0;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

.sentences-grid {
    padding: 20px;
    display: grid;
    gap: 16px;
}

.sentence-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    background: #fafafa;
    transition: all 0.2s ease;
}

.sentence-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.sentence-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.target-word {
    background: #1e40af;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    border: 2px solid #3b82f6;
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.3);
}

.word-set-badge {
    background: #059669;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.sentence-date {
    color: #64748b;
    font-size: 0.8rem;
    margin-left: auto;
}

.sentence-content {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-style: italic;
    line-height: 1.6;
    color: #374151;
    font-size: 1rem;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: #374151;
}

.empty-state p {
    margin: 0;
}