/* 考场应急通信系统 - 监考教师端 */
/* 主题色: rgb(184,35,26) #b8231a | rgb(249,249,248) #f9f9f8 */

:root {
    --theme-red: rgb(184, 35, 26);
    --theme-red-hex: #b8231a;
    --theme-cream: rgb(249, 249, 248);
    --theme-cream-hex: #f9f9f8;
    --theme-red-dark: #9a1d14;
    --theme-red-light: rgba(184, 35, 26, 0.1);
}

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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--theme-cream);
    min-height: 100vh;
    color: #333;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 页面切换 */
.page {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.page.active {
    display: flex;
    flex-direction: column;
}

/* 主操作页面特殊布局 */
#main-operation.page.active {
    align-items: stretch;
    padding: 20px;
}

/* 顶部横幅 - 口令验证页面 450px 按比例缩放 */
.header-banner {
    width: 450px;
    max-width: 100%;
    margin: 0 auto 24px;
}

.header-banner img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* 主操作页面顶部栏 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(184, 35, 26, 0.08);
    margin-bottom: 16px;
    width: 100%;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 主操作页横幅（呼叫考务办公室按钮上方）450px 按比例缩放 */
.header-banner-small {
    width: 450px;
    max-width: 100%;
}

.header-banner-small img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.system-title h1 {
    font-size: 2.0rem;
    font-weight: 600;
    color: var(--theme-red-hex);
    margin-bottom: 4px;
}

.system-title .status {
    font-size: 0.9rem;
    color: #666;
}

.top-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.time-display-large {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--theme-red-hex);
    line-height: 1;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 24px;
}

.header-school {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--theme-red-hex);
}

.header h2 {
    font-size: 1.2rem;
    font-weight: 400;
    color: #555;
}

.footer .copyright {
    font-size: 0.85rem;
    margin-top: 8px;
    color: #888;
}

/* 时间显示 */
.time-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--theme-red-hex);
    margin-bottom: 10px;
}

/* 考场信息 */
.room-info {
    font-size: 1.1rem;
    background: var(--theme-red-light);
    color: var(--theme-red-hex);
    padding: 10px 24px;
    border-radius: 25px;
    display: inline-block;
    font-weight: 500;
}

/* 考场选择网格 */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    max-width: 1000px;
    width: 100%;
    padding: 0 20px;
}

.room-btn {
    background: white;
    border: 2px solid var(--theme-red-hex);
    border-radius: 12px;
    padding: 28px 16px;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--theme-red-hex);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(184, 35, 26, 0.1);
}

.room-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(184, 35, 26, 0.2);
    background: var(--theme-red-hex);
    color: var(--theme-cream);
}

.room-btn:active {
    transform: translateY(-2px);
}

/* 表单样式 */
.selection-form, .verification-form {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(184, 35, 26, 0.08);
    border: 1px solid rgba(184, 35, 26, 0.15);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--theme-red-hex);
}

.form-group input, .form-select {
    width: 100%;
    padding: 14px;
    border: 2px solid rgba(184, 35, 26, 0.2);
    border-radius: 8px;
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus, .form-select:focus {
    outline: none;
    border-color: var(--theme-red-hex);
}

.form-group input:disabled, .form-select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* 按钮样式 */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-primary {
    background: var(--theme-red-hex);
    color: var(--theme-cream);
}

.btn-primary:hover {
    background: var(--theme-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 35, 26, 0.35);
}

.btn-secondary {
    background: white;
    color: var(--theme-red-hex);
    border: 2px solid var(--theme-red-hex);
}

.btn-secondary:hover {
    background: var(--theme-red-light);
    transform: translateY(-2px);
}

/* 消息样式 */
.message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 群发通知条 */
.broadcast-notification-bar {
    background: var(--theme-red-hex);
    color: var(--theme-cream);
    padding: 14px 24px;
    margin-bottom: 16px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(184, 35, 26, 0.3);
    width: 100%;
}

.broadcast-notification-bar .broadcast-content {
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: hidden;
}

.broadcast-notification-bar .broadcast-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.broadcast-notification-bar .broadcast-text-wrap {
    flex: 1;
    overflow: hidden;
}

.broadcast-notification-bar .broadcast-text-inner {
    display: inline-flex;
    white-space: nowrap;
    animation: broadcast-scroll 30s linear infinite;
}

.broadcast-notification-bar .broadcast-text-inner span {
    padding-right: 3em;
}

@keyframes broadcast-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.broadcast-notification-bar .broadcast-close {
    background: rgba(249, 249, 248, 0.25);
    border: none;
    color: var(--theme-cream);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
}

.broadcast-notification-bar .broadcast-close:hover {
    background: rgba(249, 249, 248, 0.4);
}

/* 主操作页面 */
.main-content {
    background: white;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: 0 4px 24px rgba(184, 35, 26, 0.08);
    border: 1px solid rgba(184, 35, 26, 0.1);
    width: 100%;
    position: relative;
}

/* 呼叫考务办公室按钮 */
.call-office-section {
    text-align: center;
    margin-bottom: 24px;
}

.btn-large {
    padding: 16px 48px;
    font-size: 1.3rem;
}

/* 考试信息显示区 */
.exam-info-section {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--theme-cream);
    border-radius: 12px;
}

.exam-tips {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.tip-item {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--theme-red-hex);
    text-align: center;
    padding: 18px;
    background: transparent;
    border: none;
    line-height: 1.25;
}

.exam-info-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
}

.info-row {
    display: flex;
    gap: 16px;
}

.info-item {
    flex: 1;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(184, 35, 26, 0.2);
}

.info-item label {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--theme-red-hex);
    margin-right: 8px;
}

.info-item span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
}

/* 消息面板 */
.message-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.message-panel .message-panel-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--theme-red-hex);
}

.panel-header h3 {
    color: var(--theme-red-hex);
    font-size: 1.3rem;
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    color: var(--theme-red-hex);
}

/* 考试信息编辑面板 */
.exam-info-edit-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.exam-info-edit-panel > div {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.edit-form .form-group {
    margin-bottom: 16px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(184, 35, 26, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--theme-red-hex);
}

/* 时间范围选择 xx:xx-xx:xx 24小时制 */
.exam-time-range .time-range-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.exam-time-range .time-range-inputs input[type="time"] {
    flex: 1;
    min-width: 0;
}

.exam-time-range .time-separator {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--theme-red-hex);
}

.message-section {
    margin-bottom: 28px;
}

.message-section:last-child {
    margin-bottom: 0;
}

.message-section h3 {
    color: var(--theme-red-hex);
    margin-bottom: 16px;
    font-size: 1.25rem;
    border-bottom: 2px solid var(--theme-red-hex);
    padding-bottom: 8px;
}

/* 快捷按钮网格 */
.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.preset-btn {
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.preset-btn.emergency {
    background: var(--theme-red-hex);
    color: var(--theme-cream);
}

.preset-btn.emergency:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(184, 35, 26, 0.35);
}

.preset-btn.warning {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
}

.preset-btn.warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}

.preset-btn.normal {
    background: white;
    color: var(--theme-red-hex);
    border: 2px solid var(--theme-red-hex);
}

.preset-btn.normal:hover {
    transform: translateY(-3px);
    background: var(--theme-red-light);
    box-shadow: 0 6px 20px rgba(184, 35, 26, 0.15);
}

/* 自定义消息 */
.custom-message {
    display: flex;
    gap: 14px;
    align-items: flex-end;
}

.custom-message textarea {
    flex: 1;
    padding: 14px;
    border: 2px solid rgba(184, 35, 26, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
}

.custom-message textarea:focus {
    outline: none;
    border-color: var(--theme-red-hex);
}

.custom-message .btn {
    flex-shrink: 0;
    padding: 14px 24px;
}

/* 消息历史 */
.message-history {
    max-height: 280px;
    overflow-y: auto;
    border: 2px solid rgba(184, 35, 26, 0.15);
    border-radius: 10px;
    padding: 16px;
    background: var(--theme-cream);
}

.message-item {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.message-item.outgoing {
    background: var(--theme-red-light);
    border-left: 4px solid var(--theme-red-hex);
}

.message-item.incoming {
    background: white;
    border-left: 4px solid #17a2b8;
}

.message-time {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 6px;
}

.message-content {
    font-size: 1rem;
    line-height: 1.5;
}

/* 状态指示器 */
.status {
    text-align: center;
    color: #555;
}

.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.online {
    background: #27ae60;
    box-shadow: 0 0 8px rgba(39,174,96,0.5);
}

.status-dot.offline {
    background: #e74c3c;
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: auto;
    padding-top: 24px;
    color: #666;
    font-size: 0.9rem;
}

/* 超大屏模式（120寸一体机） */
@media (min-width: 1920px) {
    .main-content {
        padding: 40px;
    }

    .btn-large {
        padding: 22px 72px;
        font-size: 2rem;
    }

    .exam-info-section {
        gap: 34px;
        padding: 30px;
    }

    .tip-item {
        font-size: 3.1rem;
        font-weight: 900;
        padding: 22px;
        line-height: 1.3;
    }

    .info-item {
        padding: 22px;
    }

    .info-item label {
        font-size: 1.85rem;
        font-weight: 800;
    }

    .info-item span {
        font-size: 2.1rem;
        font-weight: 800;
    }

    .room-info {
        font-size: 1.5rem;
        padding: 12px 30px;
    }

    .time-display-large {
        font-size: 4.4rem;
    }
}
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .header h2 {
        font-size: 1rem;
    }

    .time-display {
        font-size: 2rem;
    }

    .time-display-large {
        font-size: 2.5rem;
    }

    .top-bar {
        flex-direction: column;
        gap: 16px;
    }

    .top-left {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-right {
        align-items: flex-start;
        width: 100%;
    }

    .exam-info-section {
        flex-direction: column;
    }

    .info-row {
        flex-direction: column;
    }

    .tip-item {
        font-size: 1.6rem;
    }

    .room-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }

    .room-btn {
        padding: 20px 12px;
        font-size: 1.2rem;
    }

    .preset-buttons {
        grid-template-columns: 1fr;
    }

    .custom-message {
        flex-direction: column;
    }

    .custom-message .btn {
        align-self: stretch;
    }

    .message-panel .message-panel-content, .exam-info-edit-panel > div {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
}
