/* ========================================
   Figma风格极简设计 - 谁想成为百万富翁
   ======================================== */

/* 引入现代字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* 引入维语字体 */
@font-face {
    font-family: 'Alkatip Basma Tom';
    src: url('alkatip-basma-tom.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设计变量 */
:root {
    --primary: #007AFF; /* 鲜明的QQ蓝 */
    --primary-hover: #006EE6; /* 蓝色悬停效果 */
    --primary-light: #E6F2FF;
    --success: #1EA672;
    --danger: #E3506E;
    --warning: #F59E0B;
    --dark: #1E1E2E;
    --gray-900: #18181B;
    --gray-800: #27272A;
    --gray-700: #3F3F46;
    --gray-600: #52525B;
    --gray-500: #71717A;
    --gray-400: #A1A1AA;
    --gray-300: #D4D4D8;
    --gray-200: #E4E4E7;
    --gray-100: #F4F4F5;
    --gray-50: #FAFAFA;
    --white: #FFFFFF;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius: 0;
    --radius-lg: 0;
    --radius-xl: 0;
    
    --transition: all .2s ease;
}

/* 主体样式 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--gray-50);
    min-height: 100vh;
    color: var(--gray-900);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 游戏容器 */
.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
}

/* 游戏头部 */
.game-header {
    text-align: left;
}

.game-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block;
    margin: 0;
    line-height: 1.2;
}



/* 主内容区域 - Flex布局 */
.main-content-wrapper {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* 主游戏区域 */
.game-main {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 32px;
    min-height: 600px;
}

/* 奖金阶梯 - 紧贴游戏主体右侧 */
.prize-ladder {
    width: 280px;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 32px;
}

.prize-ladder h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 20px;
}

.prize-list {
    list-style: none;
    display: flex;
    flex-direction: column-reverse;
}

.prize-list li {
    padding: 12px 16px;
    margin: 4px 0;
    background: var(--gray-50);
    border-radius: var(--radius);
    font-weight: 500;
    color: var(--gray-600);
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 14px;
}

.prize-list li.current {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.prize-list li.completed {
    background: var(--success);
    color: var(--white);
}

.prize-list li.escape-point {
    border: 3px solid var(--warning);
    font-weight: 600;
}

.prize-list li.safepoint {
    border: 3px solid var(--warning);
    font-weight: 600;
}

.prize-list li.final-prize {
    border: 3px solid var(--danger);
    font-weight: 700;
}

.big-emoji {
    font-size: 22px;
    margin-left: 8px;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* 屏幕切换动画 */
.screen {
    animation: fadeIn .3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 欢迎屏幕 */
#welcomeScreen h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.rules {
    background: var(--gray-50);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    border: 1px solid var(--gray-200);
}

.rules h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.rules ul {
    list-style: none;
}

.rules li {
    padding: 12px 16px;
    margin: 8px 0;
    background: var(--white);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
    color: var(--gray-700);
    font-size: 14px;
}

.rules li strong {
    color: var(--gray-900);
    font-weight: 600;
}

/* 游戏屏幕 */
.question-info {
    display: flex;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--gray-900);
    color: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    font-weight: 600;
}

.question-container {
    background: var(--gray-50);
    padding: 32px;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.question-text {
    font-size: 22px;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

/* 答案按钮 */
.answers-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.answer-btn {
    padding: 20px 24px;
    background: var(--white);
    color: var(--gray-900);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
}

.answer-btn:hover:not(.disabled) {
    border-color: var(--primary);
    background: var(--gray-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.answer-btn:active:not(.disabled) {
    transform: translateY(0);
}

.answer-btn.disabled {
    opacity: .4;
    cursor: not-allowed;
}

.answer-btn.hidden {
    visibility: hidden;
}

.answer-btn.correct {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
    animation: pulse .4s ease-out;
}

.answer-btn.wrong {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
    animation: shake .4s ease-out;
}

.answer-btn.highlight {
    background: var(--warning);
    color: var(--white);
    border-color: var(--warning);
}

.answer-btn.fading-out {
    animation: scale-out 0.4s ease-out forwards;
}

@keyframes scale-out {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

@keyframes pulse {
    0%,100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

@keyframes shake {
    0%,100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

.answer-letter {
    background: var(--gray-100);
    color: var(--gray-700);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
}

.answer-btn.correct .answer-letter,.answer-btn.wrong .answer-letter,.answer-btn.highlight .answer-letter {
    background: rgba(255,255,255,0.2);
    color: var(--white);
}

/* 生命线技能 */
.lifelines-container {
    background: var(--gray-50);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    border: 1px solid var(--gray-200);
}

.lifelines-container h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 16px;
    text-align: center;
}

.lifelines {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.lifeline-btn {
    padding: 12px 20px;
    background: var(--white);
    color: var(--gray-900);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 110px;
    font-weight: 500;
}

.lifeline-btn:hover:not(.used) {
    border-color: var(--primary);
    background: var(--gray-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.lifeline-btn.used {
    background: var(--gray-100);
    color: var(--gray-400);
    border-color: var(--gray-200);
    cursor: not-allowed;
    opacity: .5;
}

.lifeline-btn.disabled-stage {
    background: var(--gray-100);
    color: var(--gray-400);
    border-color: var(--gray-200);
    cursor: not-allowed;
    opacity: 0.3;
}

.lifeline-btn.floating:nth-child(1) {
    animation: float 2s ease-in-out infinite;
}
.lifeline-btn.floating:nth-child(2) {
    animation: float 2s ease-in-out 0.3s infinite;
}
.lifeline-btn.floating:nth-child(3) {
    animation: float 2s ease-in-out 0.6s infinite;
}
.lifeline-btn.floating:nth-child(4) {
    animation: float 2s ease-in-out 0.9s infinite;
}

.lifeline-icon {
    font-size: 20px;
    font-weight: 700;
}

.lifeline-name {
    font-size: 12px;
    font-weight: 500;
}

/* 游戏控制区域 */
.game-controls {
    background: var(--gray-50);
    padding: 16px;
    border-radius: var(--radius-lg);
    margin-top: 24px;
    border: 1px solid var(--gray-200);
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
}

.control-btn {
    padding: 12px 8px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
    color: var(--gray-900);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 80px;
}

.control-btn:hover:not(.disabled) {
    border-color: var(--primary);
    background: var(--gray-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.control-icon {
    font-size: 24px;
}

/* 控制按钮状态 */
.control-btn.disabled {
    background: var(--gray-100);
    color: var(--gray-400);
    border-color: var(--gray-200);
    cursor: not-allowed;
    opacity: .7;
}

.control-btn.completed {
    background: var(--gray-200);
    color: var(--gray-500);
    cursor: not-allowed;
    opacity: .8;
}

.control-btn.btn-danger:not(.disabled) {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.control-btn.btn-success:not(.disabled) {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

.control-btn.btn-warning:not(.disabled) {
    background: var(--warning);
    color: var(--white);
    border-color: var(--warning);
}

/* 跑路按钮多行显示优化 */
.control-btn .control-name {
    line-height: 1.3;
    text-align: center;
}

/* 跑路按钮特殊样式 - 与测试跳转按钮一致 */
#quitButton .control-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 13px;
    line-height: 1.2;
}

#quitButton .control-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.question-id {
    background: var(--primary);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
}

#gameOverScreen {
    text-align: center;
    padding: 48px 32px;
}

#gameOverTitle {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

#gameOverMessage {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: 32px;
    line-height: 1.6;
}

.final-prize {
    font-size: 28px;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 32px;
    letter-spacing: -0.01em;
}

#safepointScreen {
    text-align: center;
    padding: 48px 32px;
}

#safepointScreen h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

#safepointScreen>p {
    color: var(--gray-600);
    font-size: 16px;
    margin-bottom: 32px;
}

.safepoint-options {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 32px;
}

.option-card {
    background: var(--gray-50);
    padding: 32px;
    border-radius: var(--radius-xl);
    flex: 1;
    max-width: 280px;
    border: 1px solid var(--gray-200);
    text-align: center;
}

.option-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
    text-align: center;
}

.option-card p {
    color: var(--gray-600);
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.warning {
    color: var(--danger);
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-xl);
    max-width: 480px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: slideIn .2s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.modal-content p {
    color: var(--gray-600);
    margin-bottom: 28px;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.phone-help,.host-help {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.phone-content,.host-content {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-xl);
    text-align: center;
    max-width: 480px;
    width: 90%;
    box-shadow: var(--shadow-xl);
}

.phone-content h3,.host-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 24px;
}

.phone-animation {
    font-size: 48px;
    animation: ring 1s ease-in-out infinite;
    margin: 24px 0;
}

.host-animation {
    font-size: 48px;
    animation: float 2s ease-in-out infinite;
    margin: 24px 0;
}

@keyframes ring {
    0%,100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

@keyframes float {
    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.timer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.timer-big-display {
    font-size: 400px;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 0 60px rgba(0,0,0,0.8);
    animation: pulse 1s ease-in-out infinite;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-big-display.warning {
    color: var(--warning);
    text-shadow: 0 0 60px rgba(245,158,11,0.8);
    font-size: 400px;
}

.timer-big-display.danger {
    color: var(--danger);
    text-shadow: 0 0 60px rgba(227,80,110,0.8);
    animation: pulse .5s ease-in-out infinite;
    font-size: 400px;
}

.timer-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 0;
    background: var(--white);
    border: 0;
    cursor: pointer;
    font-size: 28px;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 2001;
}

.timer-close-btn:hover {
    background: var(--gray-100);
    transform: scale(1.1);
}

.game-container.blurred {
    filter: blur(5px);
    pointer-events: none;
}

/* 庆祝粒子效果 */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 0;
    animation: particle-burst 1.2s ease-out forwards;
}

@keyframes particle-burst {
    0% {
        transform: translate(-50%,-50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--x),var(--y)) scale(0);
        opacity: 0;
    }
}

.celebration-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%) scale(0);
    text-align: center;
    pointer-events: none;
    animation: message-appear 1.2s ease-out forwards;
}

.celebration-message h2 {
    font-size: 72px;
    font-weight: 900;
    color: var(--white);
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
    background: linear-gradient(45deg,#ff6b6b,#4ecdc4,#45b7d1,#f9ca24,#f0932b);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 2s ease-in-out infinite;
}

@keyframes message-appear {
    0% {
        transform: translate(-50%,-50%) scale(0);
        opacity: 0;
    }

    50% {
        transform: translate(-50%,-50%) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translate(-50%,-50%) scale(1);
        opacity: 1;
    }
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0 50%;
    }
}

.host-message {
    font-size: 18px;
    color: var(--gray-700);
    margin: 24px 0;
    font-weight: 500;
}

@media (max-width:1200px) {
    .main-content-wrapper {
        flex-direction: column;
    }

    .prize-ladder {
        width: 100%;
        position: static;
        order: -1;
    }

    .prize-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .prize-list li {
        margin: 4px;
        font-size: 13px;
    }
}

@media (max-width:768px) {
    .game-container {
        padding: 16px;
    }

    .game-main {
        padding: 24px;
    }

    .answers-container {
        grid-template-columns: 1fr;
    }

    .safepoint-options {
        flex-direction: column;
        align-items: center;
    }

    .lifelines {
        flex-wrap: wrap;
    }

    .lifeline-btn {
        min-width: calc(50% - 6px);
    }

    .game-header h1 {
        font-size: 24px;
    }

    .question-text {
        font-size: 18px;
    }
}

@media (max-width:480px) {
    .game-main {
        padding: 16px;
    }

    .question-info {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .step-buttons,.action-buttons {
        flex-direction: column;
    }

    .step-btn {
        width: 100%;
    }

    .timer-big-display {
        font-size: 200px;
    }
}
.answer-btn.fading-out {
    animation: scale-out 0.4s ease-out forwards;
}

@keyframes scale-out {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

/* 维语参考版本样式 */
.uyghur-reference .question-container,
.uyghur-reference.question-container {
    background: var(--gray-100);
    border: 2px solid var(--primary);
    position: relative;
    /* 维语字体和RTL排版 */
    font-family: 'Alkatip Basma Tom', 'Microsoft Uighur', 'Arabic Typesetting', 'Traditional Arabic', Arial, sans-serif;
    direction: rtl;
    text-align: right;
    unicode-bidi: bidi-override;
}

.uyghur-reference .question-container::before,
.uyghur-reference.question-container::before {
    content: "维语参考";
    position: absolute;
    top: -10px;
    right: 20px;  /* 改为右侧，适应RTL */
    background: var(--primary);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;  /* 标签仍用中文字体 */
    direction: ltr;  /* 标签文本保持LTR */
}

.uyghur-reference .question-text {
    font-family: 'Alkatip Basma Tom', 'Microsoft Uighur', 'Arabic Typesetting', 'Traditional Arabic', Arial, sans-serif;
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;  /* 改为embed以正确处理混合文本 */
    line-height: 1.8;  /* 增加行高以适应维语字符 */
    font-size: 20px;   /* 可能需要稍微调整字体大小 */
}

.uyghur-reference .answer-btn,
.answer-btn.uyghur-answer {
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    opacity: 0.8;
    cursor: default;
    pointer-events: none;  /* 禁用所有鼠标事件，包括点击 */
    /* 维语字体和RTL排版 */
    font-family: 'Alkatip Basma Tom', 'Microsoft Uighur', 'Arabic Typesetting', 'Traditional Arabic', Arial, sans-serif;
    direction: rtl;
    text-align: right;
    unicode-bidi: bidi-override;
    justify-content: flex-end;  /* 确保内容靠右对齐 */
}

.uyghur-reference .answer-btn .answer-text,
.answer-btn.uyghur-answer .answer-text {
    font-family: 'Alkatip Basma Tom', 'Microsoft Uighur', 'Arabic Typesetting', 'Traditional Arabic', Arial, sans-serif;
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;  /* 改为embed以正确处理混合文本 */
    line-height: 1.6;
    font-size: 14px;
    flex: 1;  /* 占满剩余空间 */
    padding-left: 12px;  /* 与字母标记的间距 */
}

.uyghur-reference .answer-btn:hover,
.answer-btn.uyghur-answer:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    transform: none;
    box-shadow: none;
    cursor: default;  /* 确保悬停时也显示默认光标 */
}

/* 维语按钮中的字母标记保持LTR */
.uyghur-reference .answer-btn .answer-letter,
.answer-btn.uyghur-answer .answer-letter {
    direction: ltr;
    font-family: 'Inter', sans-serif;
    order: 2;  /* 将字母标记放在右侧 */
}

/* 调整RTL布局中的flex顺序 */
.uyghur-reference .answer-btn,
.answer-btn.uyghur-answer {
    flex-direction: row-reverse;  /* 反转flex方向以适应RTL */
}

/* 按钮基础样式 */
.btn {
    padding: 12px 24px;
    background: var(--white);
    color: var(--gray-900);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    min-height: 44px;
}

.btn:hover {
    border-color: var(--primary);
    background: var(--gray-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-safe {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

.btn-safe:hover {
    background: #16a085;
    border-color: #16a085;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 测试跳转按钮样式 */
.test-jump-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.jump-btn {
    padding: 10px 8px;
    font-size: 13px;
    min-height: 40px;
}

/* 早期选择界面的生命线显示 - 无背景框 */
.early-lifelines-display {
    margin-top: 32px;
    text-align: center;
}

.early-lifelines-display h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 16px;
    text-align: center;
}

.early-lifelines-display .lifelines {
    display: flex;
    gap: 12px;
    justify-content: center;
    background: none;
    padding: 0;
    border: none;
}

/* ========================================
   登录界面样式
   ======================================== */

.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark) 0%, var(--gray-900) 50%, #0a0a0f 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.login-container {
    background: var(--white);
    padding: 48px 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: fadeInUp 0.6s ease-out;
}

.login-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 122, 255, 0.2);
}

.login-container h2 {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-form .form-group {
    position: relative;
}

.login-form input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    background: var(--gray-50);
    color: var(--gray-900);
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 2px;
}

.login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
    transform: translateY(-2px);
}

.login-form input[type="password"]::placeholder {
    color: var(--gray-400);
    letter-spacing: normal;
}

.error-message {
    background: rgba(227, 80, 110, 0.1);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(227, 80, 110, 0.2);
    animation: shake 0.5s ease-in-out;
}

.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
