* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

/* Header */
.header {
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}

.header h1 {
    font-size: 2em;
    font-weight: bold;
}

/* Author Info */
.author-info {
    position: absolute;
    top: 15px;
    right: 20px;
    text-align: right;
    font-size: 12px;
    line-height: 1.6;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.author-info:hover {
    opacity: 1;
}

.author-text {
    font-weight: bold;
    margin-bottom: 3px;
    color: rgba(255, 255, 255, 0.95);
}

.wechat-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: normal;
}

/* Navigation Bar */
.navbar {
    background: white;
    padding: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

#importBtn { background: linear-gradient(135deg, #8B4513, #A0522D); }
#clearBtn { background: linear-gradient(135deg, #e74c3c, #c0392b); }
#smartSeatBtn { background: linear-gradient(135deg, #667eea, #764ba2); }
#roleBtn { background: linear-gradient(135deg, #16a085, #138d75); }
#showRoleBtn { background: linear-gradient(135deg, #e74c3c, #c0392b); }
#hideScoreBtn { background: linear-gradient(135deg, #7f8c8d, #5d6d7e); }
#viewToggleBtn { background: linear-gradient(135deg, #e67e22, #d35400); }
#layoutBtn { background: linear-gradient(135deg, #8B4513, #A0522D); }
#exportBtn { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
#printBtn { background: linear-gradient(135deg, #2980b9, #3498db); }

/* Main Content */
.main-content {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.seating-area {
    flex: 1;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.seating-area-wrapper {
    transition: transform 0.6s ease;
}

/* Teacher View - Move podium to bottom */
.seating-area.teacher-view .podium-btn {
    order: 3;
    margin-top: 20px;
    margin-bottom: 0;
}

.seating-area.teacher-view .seating-area-wrapper {
    transform: rotate(180deg);
    order: 2;
}

.seating-area.teacher-view .class-info {
    order: 1;
}

/* Counter-rotate seats and labels to keep them readable in teacher view */
.seating-area.teacher-view .position-label,
.seating-area.teacher-view .seat {
    transform: rotate(180deg);
}

/* Class info and podium stay in normal orientation */

/* --- 新增：头部编辑区域样式 --- */
.class-info {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.editable-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

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

.title-group .static-text {
    font-size: 1.8em;
    font-weight: bold;
    color: #2c3e50;
    white-space: nowrap;
}

.info-group-wrapper {
    display: flex;
    gap: 20px;
    align-items: center;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 15px;
    font-weight: bold;
    color: #555;
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.header-input {
    border: none;
    border-bottom: 2px dashed #bdc3c7;
    background: transparent;
    padding: 4px;
    transition: all 0.3s ease;
    text-align: center;
    color: #2c3e50;
}

.header-input:focus {
    outline: none;
    border-bottom-color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.title-input {
    font-size: 1.8em;
    font-weight: bold;
    width: 200px;
    text-align: right;
}

.info-input {
    font-size: 15px;
    width: 120px;
    font-weight: normal;
}

/* 移动端适配头部 */
@media (max-width: 900px) {
    .editable-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .title-input {
        text-align: center;
    }
}
/* ------------------------ */

.podium-btn {
    background: linear-gradient(135deg, #2c5f4e, #3d7a63);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: default;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    align-self: center;
}

/* Seating Grid */
.seating-area-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 20px;
}

.position-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 20px 10px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.position-label-left {
    background: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%);
}

.position-label-right {
    background: linear-gradient(180deg, #fa709a 0%, #fee140 100%);
}

.position-label span {
    letter-spacing: 8px;
}

.seating-grid {
    display: grid;
    gap: 15px;
    margin: 0 auto;
    max-width: 1200px;
    flex: 1;
}

.seat-row {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.seat-group {
    display: flex;
    gap: 15px;
}

.aisle-row {
    height: 30px;
    border-bottom: 2px dashed #bdc3c7;
    margin: 10px 0;
}

.aisle-col {
    width: 40px;
}

.seat {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    border: 2px solid #dfe6e9;
    border-radius: 12px;
    padding: 12px;
    min-width: 110px;
    min-height: 90px;
    cursor: move;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.seat:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.seat.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.seat.drag-over {
    border: 3px dashed #3498db;
    background: linear-gradient(135deg, #74b9ff, #a29bfe);
}

.seat.empty {
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    cursor: default;
    opacity: 0.5;
}

.seat-number {
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 11px;
    color: #7f8c8d;
    font-weight: bold;
}

.student-name {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 4px;
}

.student-info {
    font-size: 11px;
    color: #7f8c8d;
    display: flex;
    gap: 8px;
}

.student-role {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    white-space: nowrap;
}

.role-class-leader { background: #e74c3c; }
.role-study-leader { background: #27ae60; }
.role-subject-rep { background: #3498db; }
.role-group-leader { background: #f39c12; }
.role-other { background: #9b59b6; }

/* Sidebar */
.sidebar {
    width: 320px;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.sidebar h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
    text-align: center;
}

.unassigned-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
}

.unassigned-student {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    border: 2px solid #dfe6e9;
    border-radius: 10px;
    padding: 12px;
    cursor: move;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.unassigned-student:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.unassigned-student .student-name {
    font-size: 16px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-content.small {
    max-width: 450px;
}

.modal-content.role-modal {
    max-width: 700px;
}

.modal-content.smart-modal {
    max-width: 750px;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.import-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.import-option-btn {
    flex: 1;
    padding: 15px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.import-option-btn:hover,
.import-option-btn.active {
    background: #3498db;
    color: white;
}

.import-area {
    margin-bottom: 20px;
}

.import-area textarea {
    width: 100%;
    height: 250px;
    padding: 15px;
    border: 2px solid #dfe6e9;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    resize: vertical;
}

.format-hint {
    margin-top: 10px;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-left: 5px solid #4caf50;
    border-radius: 10px;
    font-size: 14px;
    color: #2e7d32;
    line-height: 2;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.smart-options,
.layout-config {
    margin-bottom: 20px;
}

.option-group,
.config-item {
    margin-bottom: 20px;
}

.option-group h3,
.config-item label {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1em;
}

.select-input,
.config-item input {
    width: 100%;
    padding: 12px;
    border: 2px solid #dfe6e9;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.select-input:focus,
.config-item input:focus {
    outline: none;
    border-color: #3498db;
}

.config-item small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 12px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e74c3c;
    color: white;
}

.btn-secondary:hover {
    background: #c0392b;
}

.clear-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.clear-option-btn {
    padding: 20px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 10px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-option-btn:hover {
    background: #3498db;
    color: white;
}

.clear-option-btn.danger {
    border-color: #e74c3c;
    color: #e74c3c;
}

.clear-option-btn.danger:hover {
    background: #e74c3c;
    color: white;
}

/* Role Management */
.role-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.role-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
}

.role-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
}

.role-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 14px;
}

.role-delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-delete-btn:hover {
    background: #c0392b;
}

.btn-add-role {
    width: 100%;
    padding: 12px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-role:hover {
    background: #229954;
}

/* Context Menu */
.context-menu {
    display: none;
    position: fixed;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    min-width: 180px;
    overflow: hidden;
}

.context-menu.active {
    display: block;
}

.context-menu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
}

.context-menu-item:hover {
    background: #f0f0f0;
}

.submenu {
    left: 100%;
    top: 0;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Strategy Tabs */
.strategy-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #ecf0f1;
}

.strategy-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #7f8c8d;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    bottom: -2px;
}

.strategy-tab:hover {
    color: #3498db;
}

.strategy-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    display: none;
}

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

/* Weight Configuration */
.weight-config {
    padding: 10px 0;
}

.weight-config h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.hint-text {
    color: #7f8c8d;
    font-size: 13px;
    margin-bottom: 25px;
    line-height: 1.6;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.weight-item {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.weight-item:hover {
    background: #e8f4f8;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.weight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.weight-header label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: bold;
    color: #2c3e50;
    cursor: pointer;
}

.weight-header input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.weight-value {
    font-size: 18px;
    font-weight: bold;
    color: #3498db;
    min-width: 50px;
    text-align: right;
}

.weight-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #dfe6e9;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 8px;
}

.weight-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.weight-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

.weight-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.weight-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

.weight-slider:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.weight-desc {
    font-size: 12px;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.4;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px dashed #dfe6e9;
}

.preset-btn {
    padding: 12px 20px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.preset-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
}

/* Print Settings */
.print-settings {
    padding: 20px 0;
}

.print-option {
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.print-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    color: #2c3e50;
}

.print-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.print-info-section {
    margin-top: 25px;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 10px;
    border-left: 4px solid #4caf50;
}

.print-info-section h3 {
    color: #2e7d32;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.print-input-group {
    margin-bottom: 15px;
}

.print-input-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 14px;
    font-weight: bold;
}

.print-input-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 14px;
}

.print-input-group input:focus {
    outline: none;
    border-color: #4caf50;
}

.print-preview-option {
    margin-top: 20px;
    text-align: center;
}

.print-tips {
    margin-top: 25px;
    padding: 20px;
    background: #fff3cd;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
}

.print-tips h4 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 1em;
}

.print-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.print-tips li {
    padding: 8px 0;
    color: #856404;
    font-size: 14px;
    line-height: 1.6;
}

.print-tips strong {
    color: #d39e00;
    font-weight: bold;
}

.btn-preview {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.btn-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

/* Print Styles */
@media print {
    /* Hide everything except print content */
    body * {
        visibility: hidden;
    }
    
    #printArea, #printArea * {
        visibility: visible;
    }
    
    #printArea {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    /* Print-specific styling */
    .print-header {
        text-align: center;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid #333;
    }
    
    .print-title {
        font-size: 24px;
        font-weight: bold;
        color: #000;
        margin-bottom: 8px;
    }

    .print-sub-info {
        display: flex;
        justify-content: center;
        gap: 25px;
        margin-bottom: 8px;
        font-size: 14px;
        color: #333;
        font-weight: bold;
    }
    
    .print-info {
        font-size: 12px;
        color: #666;
        margin: 3px 0;
    }
    
    .print-podium {
        text-align: center;
        margin: 10px 0;
        padding: 10px;
        background: #f0f0f0;
        border: 2px solid #333;
        border-radius: 8px;
        font-size: 16px;
        font-weight: bold;
    }
    
    .print-seating-wrapper {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 10px 0;
    }
    
    .print-position-label {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        padding: 15px 8px;
        border: 2px solid #333;
        border-radius: 8px;
        font-size: 14px;
        font-weight: bold;
        text-align: center;
        min-height: 120px;
        display: flex;
        align-items: center;
        justify-content: center;
        letter-spacing: 6px;
    }
    
    .print-position-left {
        background: #e3f2fd;
        color: #1976d2;
        border-color: #1976d2;
    }
    
    .print-position-right {
        background: #fff3e0;
        color: #f57c00;
        border-color: #f57c00;
    }
    
    .print-seating-grid {
        flex: 1;
        margin: 0;
    }
    
    .print-seat-row {
        display: flex;
        justify-content: center;
        gap: 6px;
        margin-bottom: 6px;
    }
    
    .print-seat {
        border: 1.5px solid #333;
        padding: 8px 6px;
        text-align: center;
        background: #fff;
        min-width: 75px;
        min-height: 70px;
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        page-break-inside: avoid;
        box-sizing: border-box;
    }
    
    .print-seat.empty {
        border: 2px dashed #ccc;
        background: #f9f9f9;
    }
    
    .print-seat-number {
        font-size: 10px;
        color: #999;
        display: block;
        margin-bottom: 5px;
    }
    
    .print-student-name {
        font-size: 14px;
        font-weight: bold;
        color: #000;
        margin-bottom: 3px;
    }
    
    .print-student-info {
        font-size: 10px;
        color: #666;
        margin-top: 3px;
        line-height: 1.3;
    }
    
    .print-student-role {
        display: inline-block;
        padding: 2px 6px;
        margin-top: 3px;
        border: 1px solid #333;
        border-radius: 4px;
        font-size: 9px;
        font-weight: bold;
        background: #f0f0f0;
    }
    
    .print-aisle {
        height: 10px;
    }
    
    .print-footer {
        display: none;  /* 隐藏页脚，避免产生第二页 */
    }
    
    /* Page break control */
    @page {
        size: A4 landscape;  /* A4纸，横向 */
        margin: 0.5cm;   /* 缩小边距 */
    }
    
    /* 调整打印区域内边距 */
    #printArea {
        padding: 10px !important;
    }
    
    .print-header {
        margin-bottom: 5px !important;
        padding-bottom: 5px !important;
    }
    
    .print-podium {
        margin: 5px 0 !important;
        padding: 8px !important;
    }
    
    .print-seating-wrapper {
        margin: 5px 0 !important;
    }
    
    /* Teacher View Print - Only rotate the seating wrapper */
    #printArea.teacher-view-print .print-seating-wrapper {
        transform: rotate(180deg) !important;
    }
    
    /* Counter-rotate seats and labels in teacher view print */
    #printArea.teacher-view-print .print-position-label,
    #printArea.teacher-view-print .print-seat {
        transform: rotate(180deg) !important;
    }
}

/* Print View Section Styles */
.print-view-section {
    margin-top: 25px;
    padding: 20px;
    background: #e3f2fd;
    border-radius: 10px;
    border-left: 4px solid #2196f3;
}

.print-view-section h3 {
    color: #1565c0;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.print-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .unassigned-list {
        flex-direction: row;
        flex-wrap: wrap;
        max-height: none;
    }
    
    .unassigned-student {
        flex: 0 0 calc(25% - 10px);
    }
}

@media (max-width: 768px) {
    .navbar {
        gap: 5px;
    }
    
    .nav-btn {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .seat {
        min-width: 90px;
        min-height: 75px;
    }
    
    .unassigned-student {
        flex: 0 0 calc(50% - 10px);
    }
    
    /* 移动端作者信息样式 */
    .author-info {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 10px;
    }
    
    .author-text {
        font-size: 10px;
        margin-bottom: 2px;
    }
    
    .wechat-text {
        font-size: 9px;
    }
    
    .header h1 {
        font-size: 1.5em;
        padding-top: 30px;
    }
    /* 确保标题和输入框在一行显示 */
.title-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.title-input {
    width: 200px !important; /* 给班级输入框固定宽度 */
    font-size: 1.5em !important;
    font-weight: bold;
    text-align: right; /* 文字靠右，靠近“座位表”三个字 */
}

.static-text {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}
}