* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    position: relative;
}

.logout-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #ff4d4f;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    z-index: 1001;
}

.logout-btn:hover {
    background-color: #ff7875;
}

.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #ffffff;
    color: #1890ff;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #1890ff;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
}

.back-btn:hover {
    background-color: #1890ff;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.25);
}

#app {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.screen {
    display: none;
    width: 100%;
    max-width: 1200px;
}

.screen.active {
    display: block;
}

.container {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
}

h1 {
    font-size: 32px;
    color: #1890ff;
    text-align: center;
    margin-bottom: 40px;
}

h2 {
    font-size: 24px;
    color: #1890ff;
    text-align: center;
    margin-bottom: 30px;
}

h3 {
    font-size: 20px;
    color: #1890ff;
    margin-bottom: 20px;
}

.key-input-wrapper, .name-input-wrapper {
    display: flex;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto 20px;
    flex-wrap: wrap;
}

.key-input-wrapper input,
.name-input-wrapper input {
    min-width: 0;
    flex: 1 1 200px;
}

.key-input-wrapper button,
.name-input-wrapper button {
    flex: 0 0 auto;
    min-width: 80px;
}

.setting-item .name-input-wrapper {
    max-width: 50%;
    margin: center;
}

input[type="text"],
input[type="password"] {
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #1890ff;
}

button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #1890ff;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover:not(:disabled) {
    background-color: #40a9ff;
}

button:disabled {
    background-color: #d9d9d9;
    cursor: not-allowed;
}

.error-message {
    color: #ff4d4f;
    text-align: center;
    margin-top: 10px;
    min-height: 20px;
}

.header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.selected-count {
    font-size: 16px;
    color: #666;
}

.selected-count span {
    color: #1890ff;
    font-weight: bold;
}

.teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.teacher-card {
    background-color: #ffffff;
    border: 2px solid #d9d9d9;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.teacher-card:hover {
    border-color: #1890ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.teacher-card.selected {
    border-color: #1890ff;
    background-color: #e6f7ff;
}

.teacher-card.must-locked {
    border-color: #ff4d4f;
    background-color: #fff1f0;
    position: relative;
}

.teacher-card.must-locked.selected {
    border-color: #ff4d4f;
    background-color: #fff1f0;
}

.teacher-card.must-locked:hover {
    border-color: #ff4d4f;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.2);
}

.must-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff4d4f;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.teacher-card.disabled {
    background-color: #f5f5f5;
    border-color: #d9d9d9;
    cursor: not-allowed;
    opacity: 0.6;
    position: relative;
}

.teacher-card.disabled:hover {
    border-color: #d9d9d9;
    box-shadow: none;
}

.full-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff4d4f;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.teacher-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.teacher-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.teacher-info strong {
    color: #333;
}

.waiting-count {
    color: #1890ff;
    font-weight: bold;
}

.submit-btn {
    display: block;
    width: 200px;
    margin: 0 auto;
    padding: 14px 28px;
    font-size: 18px;
    max-width: 100%;
}

.button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 500;
    background-color: #1890ff;
    color: #ffffff;
    border-radius: 6px;
    border: none;
    outline: none;
    text-decoration: none;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
    cursor: pointer;
}

.button-primary:hover {
    background-color: #40a9ff;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.button-primary:active {
    background-color: #096dd9;
    box-shadow: 0 1px 4px rgba(9, 109, 217, 0.4);
}

.button-primary[disabled],
.button-primary.disabled {
    background-color: #d9d9d9;
    color: #ffffff;
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

.info-text {
    text-align: center;
    color: #666;
    font-size: 16px;
    margin: 30px 0;
}

.teacher-select-wrapper {
    margin-bottom: 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.teacher-select-wrapper label {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

label {
    width: 100%;
}

.teacher-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.3s;
    cursor: pointer;
}

.teacher-select:focus {
    border-color: #1890ff;
}

.queue-display {
    margin-top: 30px;
}

.current-parent-section {
    margin-bottom: 40px;
}

.current-parent-section h3 {
    margin-bottom: 20px;
    text-align: left;
}

.current-parent-card {
    background-color: #e6f7ff;
    border: 2px solid #1890ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.current-parent-card .parent-info {
    font-size: 16px;
}

.current-parent-card .parent-info p {
    margin-bottom: 10px;
    color: #333;
}

.current-parent-card .parent-info strong {
    color: #1890ff;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.complete-btn {
    flex: 1;
    max-width: 200px;
    padding: 14px 28px;
    font-size: 18px;
    background-color: #52c41a;
}

.complete-btn:hover {
    background-color: #73d13d;
}

.skip-btn {
    flex: 1;
    max-width: 200px;
    padding: 14px 28px;
    font-size: 18px;
    background-color: #faad14;
}

.skip-btn:hover {
    background-color: #ffc53d;
}

.waiting-queue-section h3 {
    margin-bottom: 20px;
    text-align: left;
}

.waiting-queue {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.waiting-parent-card {
    background-color: #ffffff;
    border: 2px solid #d9d9d9;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
}

.waiting-parent-card:hover {
    border-color: #1890ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.queue-number {
    width: 40px;
    height: 40px;
    background-color: #1890ff;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.waiting-parent-card .parent-info {
    flex: 1;
    font-size: 14px;
}

.waiting-parent-card .parent-info p {
    margin-bottom: 5px;
    color: #666;
}

.waiting-parent-card .parent-info strong {
    color: #333;
}

.empty-queue {
    text-align: center;
    padding: 40px 20px;
}

.empty-waiting {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 20px;
}

.schedule-info {
    background-color: #f5f7fa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.info-item {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.info-item strong {
    color: #1890ff;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.schedule-item {
    background-color: #ffffff;
    border: 2px solid #1890ff;
    border-radius: 8px;
    padding: 20px;
}

.schedule-item.must {
    border-color: #ff0000;
}

.schedule-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.schedule-teacher-name {
    font-size: 18px;
    font-weight: bold;
    color: #1890ff;
}

.schedule-time {
    font-size: 16px;
    color: #333;
}

.schedule-details {
    font-size: 14px;
    color: #666;
}

.schedule-location {
    margin-top: 8px;
    color: #1890ff;
    font-weight: bold;
}

.layout-stretch {
    width: 100%;
}

.parent-screen .parent-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 60vh;
}

.parent-container-empty {
    justify-content: flex-start;
}

.parent-action-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    background: linear-gradient(145deg, #f0f5ff, #ffffff);
    border-radius: 16px;
    padding: 48px 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 24px rgba(24, 144, 255, 0.15);
}

.parent-action-card .info-text {
    margin: 0;
    max-width: 520px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.notice-content {
    margin-bottom: 20px;
}

.notice-content p {
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.countdown {
    text-align: center;
    margin-bottom: 20px;
    color: #1890ff;
    font-weight: bold;
}

.close-btn {
    display: block;
    width: 100%;
    padding: 12px;
}

@media (max-width: 768px) {
    .logout-btn {
        top: 10px;
        right: 10px;
        padding: 8px 16px;
        font-size: 14px;
    }

    .back-btn {
        top: 10px;
        left: 10px;
        padding: 8px 16px;
        font-size: 14px;
    }

    #app {
        padding: 10px;
    }

    .container {
        padding: 20px 15px;
        margin: 10px 0;
        border-radius: 6px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 30px;
    }

    h2 {
        font-size: 20px;
        margin-bottom: 25px;
    }

    h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .teacher-select-wrapper {
        max-width: 100%;
    }

    .teacher-select {
        width: 100%;
    }

    .current-parent-card {
        padding: 15px;
    }

    .current-parent-card .parent-info {
        font-size: 14px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .complete-btn,
    .skip-btn {
        width: 100%;
        max-width: 100%;
        padding: 14px 24px;
        font-size: 16px;
    }

    .waiting-parent-card {
        padding: 12px;
    }

    .queue-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .waiting-parent-card .parent-info {
        font-size: 13px;
    }

    .key-input-wrapper,
    .name-input-wrapper {
        flex-direction: column;
        max-width: 100%;
        gap: 10px;
    }

    .key-input-wrapper input,
    .name-input-wrapper input,
    .key-input-wrapper button,
    .name-input-wrapper button {
        width: 100%;
        flex: 1 1 100%;
    }

    input[type="text"],
    input[type="password"] {
        padding: 14px 16px;
        font-size: 16px;
    }

    button {
        width: 100%;
        padding: 14px 24px;
        font-size: 16px;
    }

    .teacher-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .teacher-card {
        padding: 15px;
    }

    .teacher-name {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .teacher-info {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .header-info {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .selected-count {
        font-size: 14px;
    }

    .submit-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 16px;
    }

    .schedule-info {
        padding: 15px;
    }

    .info-item {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .schedule-item {
        padding: 15px;
    }

    .schedule-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .schedule-teacher-name {
        font-size: 16px;
    }

    .schedule-time {
        font-size: 14px;
    }

    .schedule-details {
        font-size: 13px;
    }

    .parent-screen .parent-container {
        gap: 20px;
        min-height: 50vh;
    }

    .parent-action-card {
        padding: 32px 18px;
        border-radius: 12px;
        gap: 18px;
    }

    .modal-content {
        padding: 20px 15px;
        width: 95%;
        margin: 10px;
        max-height: 90vh;
    }

    .notice-content p {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .countdown {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .close-btn {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .logout-btn {
        top: 5px;
        right: 5px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .back-btn {
        top: 5px;
        left: 5px;
        padding: 6px 12px;
        font-size: 12px;
    }

    #app {
        padding: 5px;
    }

    .container {
        padding: 15px 12px;
        border-radius: 4px;
    }

    h1 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    h2 {
        font-size: 18px;
        margin-bottom: 20px;
    }

    h3 {
        font-size: 16px;
    }

    .teacher-card {
        padding: 12px;
    }

    .schedule-item {
        padding: 12px;
    }

    .modal-content {
        padding: 15px 12px;
        width: 98%;
    }

    .parent-action-card {
        padding: 28px 16px;
        gap: 16px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .teacher-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.setting-section {
    margin-bottom: 40px;
    padding: 24px;
    background-color: #f5f7fa;
    border-radius: 8px;
}

.setting-section h3 {
    margin-bottom: 20px;
    text-align: left;
    color: #1890ff;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.setting-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

.setting-input:focus {
    border-color: #1890ff;
}

.setting-input.class-select {
    flex: 0 0 30px;
    min-width: 120px;
}

.setting-hint {
    margin-top: 8px;
    font-size: 14px;
    color: #999;
}

.reserved-list {
    margin-top: 24px;
}

.reserved-list h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 16px;
    text-align: left;
}

.reserved-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 60px;
}

.reserved-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #ffffff;
    border: 2px solid #d9d9d9;
    border-radius: 6px;
    transition: all 0.3s;
}

.reserved-item:hover {
    border-color: #1890ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
}

.reserved-name {
    font-size: 16px;
    color: #333;
}

.remove-btn {
    padding: 6px 16px;
    font-size: 14px;
    background-color: #ff4d4f;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.remove-btn:hover {
    background-color: #ff7875;
}

.empty-hint {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 20px;
}

.setting-actions {
    margin-top: 40px;
    text-align: center;
}

.list-container {
    margin-top: 30px;
}

.list-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.list-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    font-size: 14px;
}

.list-table thead {
    background-color: #1890ff;
    color: #ffffff;
}

.list-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}

.list-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s;
}

.list-table tbody tr:hover {
    background-color: #f5f7fa;
}

.list-table tbody tr:last-child {
    border-bottom: none;
}

.list-table td {
    padding: 16px;
    color: #333;
    white-space: nowrap;
}

.list-table td:first-child {
    text-align: center;
    color: #666;
    font-weight: 500;
}

.empty-list {
    text-align: center;
    padding: 60px 20px;
    background-color: #f5f7fa;
    border-radius: 8px;
}

.empty-list .empty-hint {
    font-size: 16px;
    color: #999;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.status-badge.status-waiting {
    background-color: #fff7e6;
    color: #faad14;
    border: 1px solid #ffd591;
}

.status-badge.status-current {
    background-color: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.status-badge.status-completed {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.status-badge.status-skipped {
    background-color: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.download-btn::before {
    font-size: 18px;
}

@media (max-width: 768px) {
    .setting-section {
        padding: 20px 15px;
    }

    .setting-item {
        margin-bottom: 16px;
    }

    .reserved-item {
        padding: 10px 12px;
    }

    .reserved-name {
        font-size: 14px;
    }

    .remove-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .list-table-wrapper {
        border-radius: 6px;
    }

    .list-table {
        font-size: 13px;
    }

    .list-table th,
    .list-table td {
        padding: 12px 8px;
        font-size: 13px;
    }

    .list-table th {
        font-size: 14px;
    }

    .header-info {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
    }

    .empty-list {
        padding: 40px 15px;
    }
}

@media (max-width: 480px) {
    .list-table {
        font-size: 12px;
    }

    .list-table th,
    .list-table td {
        padding: 10px 6px;
        font-size: 12px;
    }

    .status-badge {
        padding: 3px 8px;
        font-size: 12px;
    }
}