/* ============================================================
   mode.css — 模式选择页（横屏/竖屏），扁平明快去渐变
   保留 JS(mode.js) 依赖的 class/id: .mode .selected .confirm
   #landscape #portrait #logo-box
   ============================================================ */

html {
    height: 100%;
    min-height: 460px;
}

body {
    position: relative;
    height: 100%;
    background: var(--bg-page, #f4f7fb);
}

#mode-box {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    /* 原来写死 520px：窄窗口会顶出横向滚动条，卡片也贴不到边 */
    width: min(520px, calc(100vw - 32px));
    height: auto;
    min-height: 320px;
    padding: clamp(22px, 4vw, 32px) clamp(18px, 4vw, 24px);
    box-sizing: border-box;
    background: var(--white, #fff);
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    text-align: center;
}

#mode-selection {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: center;
    width: min(350px, 100%);
    text-align: center;
    user-select: none;
}

.mode {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: 52px;
    font-size: 18px;
    color: var(--gray-600, #475569);
    background: var(--gray-100, #f1f5f9);
    border: 2px solid var(--gray-200, #e2e8f0);
    border-radius: 10px;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.mode:hover {
    border-color: var(--theme-blue, #2882dc);
    color: var(--theme-blue, #2882dc);
}

.mode.selected {
    color: var(--theme-blue, #2882dc);
    background: var(--theme-blue-light, #e8f2fd);
    border: 2px solid var(--theme-blue, #2882dc);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(40, 130, 220, 0.2);
}

.confirm {
    height: var(--submit-height, 42px);
    width: var(--submit-width, 130px);
    color: #fff;
    font-size: var(--submit-font-size, 16px);
    line-height: var(--submit-height, 42px);
    background: var(--theme-blue, #2882dc);
    border-radius: var(--submit-border-radius, 8px);
    box-shadow: 0 2px 8px rgba(40, 130, 220, 0.3);
    user-select: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm:hover {
    background: var(--theme-blue-dark, #1e64be);
}

.confirm:active {
    background: var(--submit-background-active, #f1f5f9);
    color: var(--gray-600, #475569);
    transform: scale(0.97);
}

#logo-box {
    display: grid;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    /* 700px 固定宽在窄视口会把页面撑出横向滚动 */
    width: min(700px, 100%);
    height: 80px;
    place-items: center;
    user-select: none;
}

#logo {
    display: block;
    height: 45px;
}
