.theme-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 20px;
    background: var(--hover-bg);
    color: var(--text-primary);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease
}

.theme-toggle:hover {
    background: var(--active-bg);
    transform: scale(1.02)
}

.theme-toggle:active {
    transform: scale(.98)
}

.theme-icon {
    font-size: 1.1rem;
    line-height: 1
}

.theme-text {
    font-size: .8rem
}

@media (max-width: 768px) {
    .theme-toggle {
        padding:6px 10px;
        border-radius: 16px
    }

    .theme-icon {
        font-size: 1rem
    }

    .theme-text {
        font-size: .75rem
    }
}

@media (max-width: 375px) {
    .theme-toggle {
        padding:6px 8px
    }

    .theme-text {
        display: none
    }
}

@media (pointer: coarse) {
    .theme-toggle {
        min-height:44px;
        min-width: 44px
    }
}

.home {
    min-height: 100vh;
    padding: 40px 20px;
    background: linear-gradient(135deg,var(--gradient-start) 0%,var(--gradient-end) 100%)
}

.home .stats-card,.home .mode-card,.home .clear-section,.home .home-title,.home .home-subtitle,.home .header-top {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease,transform .5s ease
}

.home.loaded .header-top {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s
}

.home.loaded .home-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: .1s
}

.home.loaded .home-subtitle {
    opacity: 1;
    transform: translateY(0);
    transition-delay: .15s
}

.home.loaded .stats-card {
    opacity: 1;
    transform: translateY(0);
    transition-delay: .2s
}

.home.loaded .mode-card {
    opacity: 1;
    transform: translateY(0);
    transition-delay: var(--delay, .3s)
}

.home.loaded .clear-section {
    opacity: 1;
    transform: translateY(0);
    transition-delay: .6s
}

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

.greeting-section {
    display: flex;
    align-items: center;
    gap: 12px
}

.greeting-icon {
    font-size: 2rem;
    animation: float 3s ease-in-out infinite
}

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

    50% {
        transform: translateY(-5px)
    }
}

.greeting-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start
}

.greeting-main {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff
}

.greeting-sub {
    font-size: .9rem;
    color: #fffc
}

.home-header {
    text-align: center;
    margin-bottom: 40px
}

.home-title {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px
}

.title-icon {
    font-size: 2.5rem
}

.home-subtitle {
    font-size: 1.2rem;
    color: #ffffffe6
}

.stats-card {
    max-width: 600px;
    margin: 0 auto 30px;
    text-align: center
}

.stats-card h2 {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 16px
}

.stat-item {
    padding: 20px 16px;
    border-radius: 16px;
    background: linear-gradient(145deg,#fff,#f8fafc);
    border: 1px solid rgba(226,232,240,.8);
    box-shadow: 0 2px 8px #0000000a;
    transition: all .3s ease
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px #00000014
}

.stat-item.judgment {
    background: linear-gradient(145deg,#faf5ff,#f3e8ff);
    border-color: #a855f74d
}

.stat-item.judgment:hover {
    box-shadow: 0 4px 16px #a855f726
}

.stat-item.single {
    background: linear-gradient(145deg,#eff6ff,#dbeafe);
    border-color: #3b82f64d
}

.stat-item.single:hover {
    box-shadow: 0 4px 16px #3b82f626
}

.stat-item.multiple {
    background: linear-gradient(145deg,#fffbeb,#fef3c7);
    border-color: #f59e0b4d
}

.stat-item.multiple:hover {
    box-shadow: 0 4px 16px #f59e0b26
}

.stat-number {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 6px;
    letter-spacing: -.02em
}

.stat-item.judgment .stat-number {
    color: #7c3aed
}

.stat-item.single .stat-number {
    color: #2563eb
}

.stat-item.multiple .stat-number {
    color: #d97706
}

.stat-label {
    font-size: .9rem;
    font-weight: 500;
    color: #475569
}

.stat-item.judgment .stat-label {
    color: #6d28d9
}

.stat-item.single .stat-label {
    color: #1d4ed8
}

.stat-item.multiple .stat-label {
    color: #b45309
}

:root.dark-theme .stat-item {
    background: linear-gradient(145deg,#33415599,#1e293bcc);
    border-color: #47556980;
    box-shadow: 0 2px 8px #0003
}

:root.dark-theme .stat-item:hover {
    box-shadow: 0 4px 16px #0000004d
}

:root.dark-theme .stat-number {
    color: #f8fafc
}

:root.dark-theme .stat-label {
    color: #94a3b8
}

:root.dark-theme .stat-item.judgment {
    background: linear-gradient(145deg,#8b5cf640,#7c3aed26);
    border-color: #a78bfa66
}

:root.dark-theme .stat-item.judgment .stat-number {
    color: #c4b5fd
}

:root.dark-theme .stat-item.judgment .stat-label {
    color: #a78bfa
}

:root.dark-theme .stat-item.single {
    background: linear-gradient(145deg,#60a5fa40,#3b82f626);
    border-color: #60a5fa66
}

:root.dark-theme .stat-item.single .stat-number {
    color: #93c5fd
}

:root.dark-theme .stat-item.single .stat-label {
    color: #60a5fa
}

:root.dark-theme .stat-item.multiple {
    background: linear-gradient(145deg,#fbbf2440,#f59e0b26);
    border-color: #fbbf2466
}

:root.dark-theme .stat-item.multiple .stat-number {
    color: #fcd34d
}

:root.dark-theme .stat-item.multiple .stat-label {
    color: #fbbf24
}

.mode-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 20px
}

.mode-card {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    padding: 30px;
    cursor: pointer;
    transition: all .3s ease
}

.mode-card:hover {
    transform: translateY(-4px)
}

.mode-card:hover .mode-arrow {
    opacity: 1;
    transform: translate(0)
}

.mode-icon {
    font-size: 3rem;
    margin-bottom: 16px
}

.mode-card h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text-primary)
}

.mode-card p {
    color: var(--text-secondary);
    font-size: .95rem
}

.mode-arrow {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%) translate(-10px);
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0;
    transition: all .3s ease
}

.badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--error-color);
    color: #fff;
    font-size: .8rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600
}

.clear-section {
    text-align: center;
    margin-top: 30px
}

@media (max-width: 768px) {
    .home {
        padding:24px 16px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom))
    }

    .greeting-section {
        gap: 8px;
        margin-bottom: 12px
    }

    .greeting-icon {
        font-size: 1.5rem
    }

    .greeting-main {
        font-size: 1.2rem
    }

    .greeting-sub {
        font-size: .8rem
    }

    .home-header {
        margin-bottom: 24px
    }

    .home-title {
        font-size: 1.5rem;
        flex-wrap: wrap;
        gap: 8px
    }

    .title-icon {
        font-size: 1.5rem
    }

    .home-subtitle {
        font-size: 1rem
    }

    .stats-card {
        margin-bottom: 24px
    }

    .stats-card h2 {
        font-size: 1rem;
        margin-bottom: 16px
    }

    .stats-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 12px
    }

    .stat-item {
        padding: 12px
    }

    .stat-number {
        font-size: 1.5rem
    }

    .stat-label {
        font-size: .8rem
    }

    .mode-grid {
        grid-template-columns: 1fr;
        gap: 16px
    }

    .mode-card {
        padding: 20px;
        min-height: 80px
    }

    .mode-card:active {
        transform: scale(.98)
    }

    .mode-icon {
        font-size: 2rem;
        margin-bottom: 12px
    }

    .mode-card h3 {
        font-size: 1.2rem;
        margin-bottom: 4px
    }

    .mode-card p {
        font-size: .85rem
    }

    .badge {
        top: 12px;
        right: 12px;
        font-size: .75rem;
        padding: 3px 8px
    }

    .clear-section {
        margin-top: 24px
    }

    .clear-section .btn {
        width: 100%
    }
}

@media (max-width: 375px) {
    .home {
        padding:16px 12px
    }

    .home-title {
        font-size: 1.3rem
    }

    .greeting-main {
        font-size: 1.1rem
    }

    .stat-number {
        font-size: 1.3rem
    }

    .mode-card {
        padding: 16px
    }

    .mode-icon {
        font-size: 1.8rem
    }

    .mode-card h3 {
        font-size: 1.1rem
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .home {
        padding:32px 24px
    }

    .home-title {
        font-size: 2rem
    }

    .mode-grid {
        max-width: 700px;
        gap: 18px
    }

    .mode-card {
        padding: 26px
    }
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px
}

.level-switch {
    display: flex;
    background: #ffffff26;
    border-radius: 24px;
    padding: 4px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px)
}

.level-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: #fffc;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .3s ease
}

.level-btn:hover {
    color: #fff
}

.level-btn.active {
    background: #fff;
    color: #6366f1;
    box-shadow: 0 2px 8px #00000026
}

@media (max-width: 768px) {
    .header-controls {
        flex-direction:column;
        gap: 12px
    }

    .level-switch {
        order: -1
    }

    .level-btn {
        padding: 5px 12px;
        font-size: .85rem
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .header-controls {
        flex-direction:row
    }

    .level-switch {
        order: 0
    }
}

.question-card {
    max-width: 800px;
    margin: 0 auto
}

.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color)
}

.question-number {
    font-size: .95rem;
    color: var(--text-secondary);
    font-weight: 500
}

.question-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .85rem;
    color: #fff;
    font-weight: 500
}

.question-content {
    margin-bottom: 24px
}

.question-title {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-primary)
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px
}

.option-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden
}

.option-item:before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg,transparent 0%,rgba(99,102,241,.05) 100%);
    opacity: 0;
    transition: opacity .25s ease
}

.option-item:hover:not(.correct):not(.wrong) {
    border-color: var(--primary-color);
    background: #f8fafc;
    transform: translate(4px)
}

.option-item:hover:not(.correct):not(.wrong):before {
    opacity: 1
}

.option-item.selected {
    border-color: var(--primary-color);
    background: #eef2ff;
    transform: translate(4px)
}

.option-item.selected:before {
    opacity: 1
}

.option-item.correct {
    border-color: var(--success-color);
    background: #ecfdf5;
    animation: correctPop .4s ease
}

@keyframes correctPop {
    0% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.02)
    }

    to {
        transform: scale(1)
    }
}

.option-item.wrong {
    border-color: var(--error-color);
    background: #fef2f2;
    animation: shake .4s ease
}

.option-item.disabled {
    cursor: not-allowed;
    opacity: .9
}

.option-item.disabled:hover {
    transform: none
}

.option-key {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border-color);
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all .2s ease
}

.option-item.selected .option-key {
    background: var(--primary-color);
    color: #fff
}

.option-item.correct .option-key {
    background: var(--success-color);
    color: #fff
}

.option-item.wrong .option-key {
    background: var(--error-color);
    color: #fff
}

.option-value {
    flex: 1;
    font-size: 1rem;
    line-height: 1.6
}

.option-indicator {
    position: absolute;
    right: 16px;
    font-size: 1.2rem;
    font-weight: 700
}

.correct-icon {
    color: var(--success-color)
}

.wrong-icon {
    color: var(--error-color)
}

.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem
}

.result-section {
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    animation: slideUp .4s cubic-bezier(.4,0,.2,1)
}

.result-section.correct {
    background: linear-gradient(135deg,#ecfdf5,#d1fae5);
    border: 1px solid var(--success-color)
}

.result-section.wrong {
    background: linear-gradient(135deg,#fef2f2,#fecaca);
    border: 1px solid var(--error-color)
}

.result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px
}

.result-icon {
    font-size: 1.5rem;
    animation: bounce .5s ease
}

@keyframes bounce {
    0%,to {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-8px)
    }
}

.result-text {
    font-size: 1.1rem;
    font-weight: 600
}

.result-section.correct .result-text {
    color: var(--success-color)
}

.result-section.wrong .result-text {
    color: var(--error-color)
}

.correct-answer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,.1)
}

.correct-answer .label {
    font-weight: 600;
    color: var(--text-secondary)
}

.correct-answer .answer {
    color: var(--success-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin-left: 8px
}

.correct-answer .your-answer {
    margin-left: 16px;
    color: var(--error-color)
}

.analysis {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,.1)
}

.analysis .label {
    font-weight: 600;
    color: var(--text-secondary)
}

.analysis p {
    margin-top: 8px;
    color: var(--text-primary);
    line-height: 1.6
}

:root.dark-theme .option-item {
    background: transparent;
    border-color: #475569
}

:root.dark-theme .option-item:hover:not(.correct):not(.wrong) {
    background: #33415580;
    border-color: var(--primary-color)
}

:root.dark-theme .option-item.selected {
    background: #6366f126;
    border-color: var(--primary-color)
}

:root.dark-theme .option-item.correct {
    background: #22c55e26;
    border-color: var(--success-color)
}

:root.dark-theme .option-item.correct .option-value {
    color: #bbf7d0
}

:root.dark-theme .option-item.wrong {
    background: #ef444426;
    border-color: var(--error-color)
}

:root.dark-theme .option-key {
    background: #475569;
    color: #f1f5f9
}

:root.dark-theme .option-item.selected .option-key {
    background: var(--primary-color);
    color: #fff
}

:root.dark-theme .option-item.correct .option-key {
    background: var(--success-color);
    color: #fff
}

:root.dark-theme .option-item.wrong .option-key {
    background: var(--error-color);
    color: #fff
}

:root.dark-theme .option-value {
    color: #e2e8f0
}

:root.dark-theme .result-section.correct {
    background: linear-gradient(135deg,#22c55e33,#16a34a26)
}

:root.dark-theme .result-section.wrong {
    background: linear-gradient(135deg,#ef444433,#dc262626)
}

:root.dark-theme .correct-answer {
    border-top-color: #ffffff1a
}

:root.dark-theme .correct-answer .label {
    color: #cbd5e1
}

:root.dark-theme .analysis {
    border-top-color: #ffffff1a
}

:root.dark-theme .analysis .label {
    color: #cbd5e1
}

:root.dark-theme .analysis p {
    color: #e2e8f0
}

@media (max-width: 768px) {
    .question-card {
        padding:0
    }

    .question-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
        flex-wrap: wrap;
        gap: 8px
    }

    .question-number {
        font-size: .85rem
    }

    .question-type {
        padding: 3px 10px;
        font-size: .8rem
    }

    .question-content {
        margin-bottom: 20px
    }

    .question-title {
        font-size: 1.05rem;
        line-height: 1.7
    }

    .options-list {
        gap: 10px;
        margin-bottom: 20px
    }

    .option-item {
        padding: 14px 12px;
        min-height: 52px
    }

    .option-item:hover:not(.correct):not(.wrong) {
        transform: none;
        background: transparent
    }

    .option-item:active:not(.correct):not(.wrong) {
        background: #f8fafc;
        transform: scale(.98)
    }

    .option-item.selected {
        transform: none
    }

    .option-key {
        width: 32px;
        height: 32px;
        font-size: .9rem;
        margin-right: 10px
    }

    .option-value {
        font-size: .95rem;
        line-height: 1.5
    }

    .option-indicator {
        right: 12px;
        font-size: 1rem
    }

    .submit-btn {
        padding: 14px;
        font-size: 1rem;
        min-height: 48px
    }

    .result-section {
        padding: 16px;
        margin-top: 16px
    }

    .result-header {
        margin-bottom: 10px
    }

    .result-icon {
        font-size: 1.3rem
    }

    .result-text {
        font-size: 1rem
    }

    .correct-answer {
        margin-top: 10px;
        padding-top: 10px;
        font-size: .95rem
    }

    .correct-answer .answer {
        font-size: 1rem
    }

    .analysis {
        margin-top: 10px;
        padding-top: 10px
    }

    .analysis p {
        font-size: .9rem;
        line-height: 1.6
    }
}

@media (max-width: 375px) {
    .question-title {
        font-size:.95rem
    }

    .option-item {
        padding: 12px 10px;
        min-height: 48px
    }

    .option-key {
        width: 28px;
        height: 28px;
        font-size: .85rem;
        margin-right: 8px
    }

    .option-value {
        font-size: .9rem
    }

    .submit-btn {
        padding: 12px;
        font-size: .95rem
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .question-card {
        max-width:100%
    }

    .question-header {
        margin-bottom: 12px;
        padding-bottom: 8px
    }

    .question-content {
        margin-bottom: 12px
    }

    .question-title {
        font-size: .95rem;
        line-height: 1.5
    }

    .options-list {
        gap: 8px;
        margin-bottom: 12px
    }

    .option-item {
        padding: 10px;
        min-height: 44px
    }

    .option-key {
        width: 28px;
        height: 28px
    }

    .option-value {
        font-size: .9rem
    }

    .submit-btn {
        padding: 10px;
        font-size: .9rem
    }

    .result-section {
        padding: 12px;
        margin-top: 12px
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .question-card {
        max-width:700px
    }

    .question-title {
        font-size: 1.15rem
    }

    .option-item {
        padding: 14px
    }
}

@media (pointer: coarse) {
    .option-item {
        min-height:48px
    }

    .option-key {
        width: 36px;
        height: 36px
    }

    .submit-btn {
        min-height: 48px
    }
}

@keyframes shake {
    0%,to {
        transform: translate(0)
    }

    20% {
        transform: translate(-6px)
    }

    40% {
        transform: translate(6px)
    }

    60% {
        transform: translate(-4px)
    }

    80% {
        transform: translate(4px)
    }
}

.question-nav {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    height: 100%;
    max-height: 100%;
    animation: slideInLeft .4s ease
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translate(-20px)
    }

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

.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg,var(--primary-color) 0%,#7c3aed 100%);
    color: #fff
}

.nav-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0
}

.nav-count {
    font-size: .85rem;
    opacity: .9;
    background: #fff3;
    padding: 4px 10px;
    border-radius: 12px
}

.nav-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color)
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .75rem;
    color: var(--text-secondary)
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 1px solid #cbd5e1
}

.legend-dot.correct {
    background: var(--success-color);
    border-color: var(--success-color)
}

.legend-dot.wrong {
    background: var(--error-color);
    border-color: var(--error-color)
}

.legend-dot.answered {
    background: var(--primary-color);
    border-color: var(--primary-color)
}

.legend-dot.viewed {
    background: var(--primary-color);
    border-color: var(--primary-color);
    opacity: .7
}

.legend-dot.current {
    background: var(--warning-color);
    border-color: var(--warning-color)
}

.nav-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    min-height: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch
}

.nav-scroll::-webkit-scrollbar {
    width: 6px
}

.nav-scroll::-webkit-scrollbar-track {
    background: #f1f5f9
}

.nav-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px
}

.nav-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 8px
}

.nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    overflow: hidden
}

.nav-item:before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: transparent;
    transition: background .25s ease
}

.nav-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px #6366f133
}

.nav-item:hover:before {
    background: #6366f10d
}

.nav-item:active {
    transform: translateY(0)
}

.nav-item.current {
    border-color: var(--primary-color);
    background: linear-gradient(135deg,#6366f11a,#7c3aed1a);
    box-shadow: 0 0 0 3px #6366f133;
    animation: pulse 2s infinite
}

@keyframes pulse {
    0%,to {
        box-shadow: 0 0 0 3px #6366f133
    }

    50% {
        box-shadow: 0 0 0 5px #6366f14d
    }
}

.nav-item.correct {
    border-color: var(--success-color);
    background: linear-gradient(135deg,#22c55e1a,#16a34a1a)
}

.nav-item.correct:hover {
    border-color: var(--success-color);
    box-shadow: 0 4px 12px #22c55e33
}

.nav-item.wrong {
    border-color: var(--error-color);
    background: linear-gradient(135deg,#ef44441a,#dc26261a)
}

.nav-item.wrong:hover {
    border-color: var(--error-color);
    box-shadow: 0 4px 12px #ef444433
}

.nav-item.answered {
    border-color: var(--primary-color);
    background: #6366f10d
}

.nav-item.viewed {
    border-color: var(--primary-color);
    background: linear-gradient(135deg,#6366f114,#7c3aed14)
}

.nav-item.viewed:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px #6366f133
}

.type-indicator {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: .6rem;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 4px;
    color: #fff
}

.type-indicator.type-judgment {
    background: linear-gradient(135deg,#f59e0b,#d97706)
}

.type-indicator.type-single {
    background: linear-gradient(135deg,#3b82f6,#2563eb)
}

.type-indicator.type-multiple {
    background: linear-gradient(135deg,#8b5cf6,#7c3aed)
}

.item-number {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-primary);
    z-index: 1
}

.nav-item.current .item-number {
    color: var(--primary-color)
}

.status-icon {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: .65rem;
    font-weight: 700
}

.nav-item.correct .status-icon {
    color: var(--success-color)
}

.nav-item.wrong .status-icon {
    color: var(--error-color)
}

.nav-item.viewed .status-icon.viewed-icon {
    font-size: .6rem;
    color: var(--primary-color)
}

.nav-footer {
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--border-color)
}

.nav-stats {
    display: flex;
    justify-content: space-around
}

.nav-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px
}

.nav-stats .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary)
}

.nav-stats .stat-value.correct {
    color: var(--success-color)
}

.nav-stats .stat-value.wrong {
    color: var(--error-color)
}

.nav-stats .stat-value.viewed {
    color: var(--primary-color)
}

.nav-stats .stat-label {
    font-size: .75rem;
    color: var(--text-secondary)
}

:root.dark-theme .question-nav {
    background: var(--card-bg)
}

:root.dark-theme .nav-legend {
    background: #0f172a80;
    border-bottom-color: var(--border-color)
}

:root.dark-theme .legend-item {
    color: #94a3b8
}

:root.dark-theme .legend-dot {
    background: #334155;
    border-color: #475569
}

:root.dark-theme .nav-item {
    background: #1e293bcc;
    border-color: #475569
}

:root.dark-theme .nav-item:hover {
    border-color: var(--primary-color)
}

:root.dark-theme .nav-item:hover:before {
    background: #818cf81a
}

:root.dark-theme .nav-item.current {
    border-color: var(--primary-color);
    background: linear-gradient(135deg,#818cf833,#7c3aed33)
}

:root.dark-theme .nav-item.current .item-number {
    color: var(--primary-color)
}

:root.dark-theme .nav-item.correct {
    border-color: var(--success-color);
    background: linear-gradient(135deg,#34d39926,#10b98126)
}

:root.dark-theme .nav-item.wrong {
    border-color: var(--error-color);
    background: linear-gradient(135deg,#f8717126,#ef444426)
}

:root.dark-theme .nav-item.answered {
    border-color: var(--primary-color);
    background: #818cf81a
}

:root.dark-theme .nav-item.viewed {
    border-color: var(--primary-color);
    background: linear-gradient(135deg,#818cf826,#7c3aed26)
}

:root.dark-theme .item-number {
    color: #e2e8f0
}

:root.dark-theme .nav-footer {
    background: #0f172a80;
    border-top-color: var(--border-color)
}

:root.dark-theme .nav-stats .stat-value {
    color: #f1f5f9
}

:root.dark-theme .nav-stats .stat-label {
    color: #94a3b8
}

:root.dark-theme .nav-scroll::-webkit-scrollbar-track {
    background: #0f172a80
}

:root.dark-theme .nav-scroll::-webkit-scrollbar-thumb {
    background: #475569
}

:root.dark-theme .nav-scroll::-webkit-scrollbar-thumb:hover {
    background: #64748b
}

@media (max-width: 1200px) {
    .nav-grid {
        grid-template-columns:repeat(4,1fr)
    }
}

@media (max-width: 768px) {
    .question-nav {
        border-radius:12px;
        height: 100%
    }

    .nav-header {
        padding: 10px 14px
    }

    .nav-header h3 {
        font-size: .85rem
    }

    .nav-count {
        font-size: .75rem;
        padding: 3px 8px
    }

    .nav-legend {
        display: none
    }

    .nav-scroll {
        padding: 10px;
        -webkit-overflow-scrolling: touch
    }

    .nav-grid {
        grid-template-columns: repeat(6,1fr);
        gap: 6px
    }

    .nav-item {
        border-radius: 8px;
        border-width: 1.5px;
        min-width: 36px;
        min-height: 36px
    }

    .item-number {
        font-size: .75rem
    }

    .type-indicator {
        font-size: .45rem;
        padding: 1px 2px;
        top: 1px;
        left: 1px
    }

    .status-icon {
        font-size: .5rem;
        bottom: 1px;
        right: 1px
    }

    .nav-footer {
        padding: 10px 14px
    }

    .nav-stats .stat-value {
        font-size: 1rem
    }

    .nav-stats .stat-label {
        font-size: .7rem
    }
}

@media (max-width: 375px) {
    .nav-header {
        padding:8px 12px
    }

    .nav-header h3 {
        font-size: .8rem
    }

    .nav-scroll {
        padding: 8px
    }

    .nav-grid {
        grid-template-columns: repeat(8,1fr);
        gap: 4px
    }

    .nav-item {
        min-width: 32px;
        min-height: 32px;
        border-radius: 6px
    }

    .item-number {
        font-size: .7rem
    }

    .type-indicator {
        display: none
    }

    .status-icon {
        font-size: .45rem
    }

    .nav-footer {
        padding: 8px 12px
    }

    .nav-stats .stat-value {
        font-size: .9rem
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .nav-grid {
        grid-template-columns:repeat(10,1fr);
        gap: 4px
    }

    .nav-item {
        min-width: 32px;
        min-height: 32px
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .nav-grid {
        grid-template-columns:repeat(5,1fr);
        gap: 8px
    }

    .nav-item {
        min-width: 40px;
        min-height: 40px
    }
}

@media (pointer: coarse) {
    .nav-item {
        min-width:44px;
        min-height: 44px
    }

    .nav-item:active {
        transform: scale(.95)
    }
}

.progress-dialog-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #00000080;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity .3s ease;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px)
}

.progress-dialog-overlay.visible {
    opacity: 1
}

.progress-dialog {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px #0000004d;
    transform: scale(.9) translateY(20px);
    transition: transform .3s cubic-bezier(.34,1.56,.64,1)
}

.progress-dialog.visible {
    transform: scale(1) translateY(0)
}

.dialog-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    animation: bounce .6s ease
}

@keyframes bounce {
    0%,to {
        transform: translateY(0)
    }

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

.dialog-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px
}

.dialog-content {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px
}

.progress-info {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 12px
}

.progress-info .highlight {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3rem
}

.progress-info .total-info {
    color: var(--text-secondary);
    font-size: 1rem
}

.progress-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px
}

.progress-stats .stat {
    font-weight: 600;
    font-size: 1rem
}

.progress-stats .stat.correct {
    color: var(--success-color)
}

.progress-stats .stat.wrong {
    color: var(--error-color)
}

.progress-time {
    font-size: .9rem;
    color: var(--text-secondary)
}

.dialog-actions {
    display: flex;
    gap: 12px
}

:root.dark-theme .progress-dialog {
    background: var(--card-bg)
}

:root.dark-theme .dialog-title {
    color: #f8fafc
}

:root.dark-theme .dialog-content {
    background: #0f172a80
}

:root.dark-theme .progress-info {
    color: #f1f5f9
}

:root.dark-theme .progress-info .total-info {
    color: #cbd5e1
}

:root.dark-theme .progress-time {
    color: #94a3b8
}

.dialog-actions .btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600
}

@media (max-width: 480px) {
    .progress-dialog {
        padding:24px;
        margin: 16px
    }

    .dialog-icon {
        font-size: 2.5rem
    }

    .dialog-title {
        font-size: 1.2rem
    }

    .progress-info {
        font-size: 1rem
    }

    .progress-info .highlight {
        font-size: 1.1rem
    }

    .dialog-actions {
        flex-direction: column
    }
}

.combo-tip {
    position: fixed;
    top: 150px;
    right: -300px;
    background: linear-gradient(135deg,gold,#ff8c00);
    border-radius: 16px;
    padding: 12px 20px;
    box-shadow: 0 8px 32px #ff8c0066;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all .3s cubic-bezier(.34,1.56,.64,1)
}

.combo-tip.visible {
    opacity: 1;
    right: 20px;
    transform: translate(0)
}

.combo-content {
    display: flex;
    align-items: center;
    gap: 12px
}

.combo-emoji {
    font-size: 1.5rem;
    animation: bounce .6s ease infinite
}

@keyframes bounce {
    0%,to {
        transform: translateY(0) scale(1)
    }

    50% {
        transform: translateY(-5px) scale(1.1)
    }
}

.combo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start
}

.combo-count {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,.2)
}

.combo-message {
    font-size: .85rem;
    color: #fffffff2;
    font-weight: 500
}

.combo-stars {
    display: flex;
    justify-content: flex-start;
    gap: 2px;
    margin-top: 6px
}

.combo-stars .star {
    font-size: .75rem;
    animation: starPop .3s ease forwards;
    opacity: 0
}

@keyframes starPop {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-20deg)
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0)
    }
}

.completion-tip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    border-radius: 16px;
    margin-top: 20px;
    animation: slideUp .5s ease
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(20px)
    }

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

.completion-tip.excellent {
    background: linear-gradient(135deg,gold,#ff8c00);
    box-shadow: 0 8px 32px #ff8c004d
}

.completion-tip.good {
    background: linear-gradient(135deg,#a855f7,#7c3aed);
    box-shadow: 0 8px 32px #a855f74d
}

.completion-tip.progress {
    background: linear-gradient(135deg,#3b82f6,#2563eb);
    box-shadow: 0 8px 32px #3b82f64d
}

.completion-tip.encourage {
    background: linear-gradient(135deg,#22c55e,#16a34a);
    box-shadow: 0 8px 32px #22c55e4d
}

.completion-tip.cheer-up {
    background: linear-gradient(135deg,#f472b6,#ec4899);
    box-shadow: 0 8px 32px #f472b64d
}

.completion-emoji {
    font-size: 3rem;
    animation: pulse 1.5s ease infinite
}

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

    50% {
        transform: scale(1.1)
    }
}

.completion-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px
}

.completion-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff
}

.completion-message {
    font-size: 1.1rem;
    color: #ffffffe6
}

.completion-accuracy {
    font-size: 1rem;
    font-weight: 600;
    color: #fffc;
    padding: 6px 16px;
    background: #fff3;
    border-radius: 20px
}

@media (max-width: 768px) {
    .combo-tip {
        padding:12px 24px;
        top: 70px
    }

    .combo-emoji {
        font-size: 1.5rem
    }

    .combo-count {
        font-size: 1.2rem
    }

    .combo-message {
        font-size: .9rem
    }

    .completion-tip {
        padding: 16px
    }

    .completion-emoji {
        font-size: 2.5rem
    }

    .completion-title {
        font-size: 1.3rem
    }

    .completion-message {
        font-size: 1rem
    }
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #00000080;
    z-index: 1000;
    animation: fadeIn .2s ease
}

.mobile-nav-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: var(--card-bg);
    box-shadow: -4px 0 20px #00000026;
    display: flex;
    flex-direction: column;
    animation: slideInRight .25s ease
}

@keyframes fadeIn {
    0% {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes slideInRight {
    0% {
        transform: translate(100%)
    }

    to {
        transform: translate(0)
    }
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--primary-color);
    color: #fff
}

.mobile-nav-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600
}

.mobile-nav-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #fff3;
    color: #fff;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s
}

.mobile-nav-close:hover {
    background: #ffffff4d
}

.mobile-nav-close:active {
    background: #fff6
}

.mobile-nav-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch
}

.mobile-nav-content .question-nav {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0
}

.mobile-nav-content .question-nav h4 {
    display: none
}

.mobile-nav-content .nav-grid {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 10px
}

.mobile-nav-content .nav-item {
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 600
}

:root.dark-theme .mobile-nav-panel {
    box-shadow: -4px 0 20px #0006
}

@media (max-width: 375px) {
    .mobile-nav-panel {
        width:90%;
        max-width: 300px
    }

    .mobile-nav-header {
        padding: 14px 16px
    }

    .mobile-nav-header h3 {
        font-size: 1rem
    }

    .mobile-nav-close {
        width: 32px;
        height: 32px;
        font-size: 1rem
    }

    .mobile-nav-content {
        padding: 12px
    }

    .mobile-nav-content .nav-grid {
        gap: 8px
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .mobile-nav-panel {
        width:50%;
        max-width: 280px
    }
}

.mobile-nav-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    padding-bottom: max(8px,env(safe-area-inset-bottom));
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px #0000001a;
    z-index: 900
}

.mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 70px;
    min-height: 50px;
    padding: 8px 12px;
    border: none;
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: .75rem;
    cursor: pointer;
    transition: all .2s ease
}

.mobile-nav-btn:active {
    transform: scale(.95)
}

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

.mobile-nav-btn:disabled:active {
    transform: none
}

.mobile-nav-btn .btn-icon {
    font-size: 1.2rem;
    font-weight: 600
}

.mobile-nav-btn .btn-text {
    font-size: .7rem;
    color: var(--text-secondary)
}

.prev-btn {
    flex: 1;
    max-width: 100px
}

.prev-btn:not(:disabled):hover {
    background: var(--border-color)
}

.menu-btn {
    flex: 0 0 auto;
    min-width: 80px;
    background: var(--primary-color);
    color: #fff
}

.menu-btn .btn-text {
    color: #fffc
}

.menu-btn:active {
    background: var(--primary-hover-color, #4338ca)
}

.next-btn {
    flex: 1;
    max-width: 100px
}

.next-btn:not(:disabled):hover {
    background: var(--border-color)
}

:root.dark-theme .mobile-nav-buttons {
    box-shadow: 0 -2px 10px #0000004d
}

@media (max-width: 375px) {
    .mobile-nav-buttons {
        padding:6px 10px;
        padding-bottom: max(6px,env(safe-area-inset-bottom))
    }

    .mobile-nav-btn {
        min-width: 60px;
        min-height: 46px;
        padding: 6px 10px
    }

    .mobile-nav-btn .btn-icon {
        font-size: 1.1rem
    }

    .mobile-nav-btn .btn-text {
        font-size: .65rem
    }

    .menu-btn {
        min-width: 70px
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .mobile-nav-buttons {
        padding:6px 16px
    }

    .mobile-nav-btn {
        flex-direction: row;
        gap: 6px;
        min-width: 80px;
        min-height: 40px;
        padding: 6px 14px
    }

    .mobile-nav-btn .btn-icon {
        font-size: 1rem
    }

    .mobile-nav-btn .btn-text {
        font-size: .8rem
    }

    .menu-btn {
        min-width: 90px
    }
}

.sequential-mode {
    min-height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column
}

.mode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100
}

.header-left,.header-right {
    display: flex;
    align-items: center;
    gap: 16px
}

.nav-toggle-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all .2s
}

.nav-toggle-btn:hover {
    background: var(--primary-color);
    color: #fff
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color .2s
}

.back-btn:hover {
    color: var(--primary-color)
}

.mode-header h1 {
    font-size: 1.2rem;
    color: var(--text-primary)
}

.header-stats {
    display: flex;
    gap: 16px
}

.correct-count {
    color: var(--success-color);
    font-weight: 600
}

.wrong-count {
    color: var(--error-color);
    font-weight: 600
}

.progress-bar {
    position: relative;
    height: 8px;
    background: var(--border-color)
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg,var(--primary-color),#7c3aed);
    transition: width .3s ease
}

.progress-text {
    position: absolute;
    right: 24px;
    top: 16px;
    font-size: .9rem;
    color: var(--text-secondary)
}

.mode-content {
    flex: 1;
    display: flex;
    gap: 24px;
    padding: 24px;
    overflow: hidden
}

.nav-sidebar {
    width: 280px;
    flex-shrink: 0;
    animation: slideIn .3s ease
}

.question-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0
}

.question-area.full-width {
    max-width: 900px;
    margin: 0 auto
}

.question-container {
    flex: 1;
    overflow-y: auto
}

.next-btn-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    animation: fadeIn .3s ease
}

.next-btn {
    padding: 16px 32px;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg)
}

.auto-next-hint {
    text-align: center;
    padding: 16px;
    color: var(--success-color);
    font-weight: 500;
    animation: fadeIn .3s ease
}

.completion-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg,#667eea,#764ba2)
}

.completion-card {
    text-align: center;
    max-width: 500px;
    width: 100%
}

.completion-icon {
    font-size: 4rem;
    margin-bottom: 16px
}

.completion-card h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--text-primary)
}

.completion-card>p {
    color: var(--text-secondary);
    margin-bottom: 24px
}

.completion-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px
}

.completion-stats .stat {
    text-align: center
}

.completion-stats .number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px
}

.completion-stats .stat.correct .number {
    color: var(--success-color)
}

.completion-stats .stat.wrong .number {
    color: var(--error-color)
}

.completion-stats .stat.rate .number {
    color: var(--primary-color)
}

.completion-stats .label {
    font-size: .9rem;
    color: var(--text-secondary)
}

.completion-actions {
    display: flex;
    gap: 16px;
    justify-content: center
}

@media (min-width: 769px) {
    .sequential-mode {
        height:100dvh;
        overflow: hidden
    }

    .mode-content {
        min-height: 0
    }

    .nav-sidebar {
        display: flex;
        min-height: 0;
        overflow: hidden
    }

    .nav-sidebar .question-nav {
        flex: 1;
        min-height: 0
    }

    .question-area {
        min-height: 0;
        overflow: hidden
    }

    .question-container {
        min-height: 0
    }

    .next-btn-container {
        z-index: 150
    }

    .next-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: fit-content;
        max-width: calc(100vw - 48px);
        white-space: nowrap
    }
}

@media (max-width: 1024px) {
    .nav-sidebar {
        width:240px
    }
}

@media (max-width: 768px) {
    .sequential-mode {
        padding-bottom:80px
    }

    .mode-header {
        padding: 12px 16px
    }

    .mode-header h1 {
        font-size: 1rem
    }

    .header-left,.header-right {
        gap: 8px
    }

    .back-btn {
        font-size: .9rem
    }

    .back-btn span {
        display: none
    }

    .nav-toggle-btn {
        width: 40px;
        height: 40px
    }

    .header-stats {
        font-size: .9rem;
        gap: 12px
    }

    .progress-text {
        right: 16px;
        top: 12px;
        font-size: .8rem
    }

    .mode-content {
        flex-direction: column;
        padding: 16px;
        gap: 16px
    }

    .nav-sidebar {
        width: 100%;
        max-height: 180px;
        order: 2;
        flex-shrink: 0
    }

    .question-area {
        order: 1;
        flex: 1;
        min-height: 0
    }

    .question-container {
        padding: 0
    }

    .next-btn-container {
        position: fixed;
        bottom: 16px;
        right: 16px;
        left: 16px;
        z-index: 50
    }

    .next-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 1rem
    }

    .auto-next-hint {
        padding: 12px;
        font-size: .9rem
    }

    .completion-page {
        padding: 16px
    }

    .completion-card {
        padding: 20px
    }

    .completion-icon {
        font-size: 3rem
    }

    .completion-card h2 {
        font-size: 1.5rem
    }

    .completion-card>p {
        font-size: .9rem;
        margin-bottom: 20px
    }

    .completion-stats {
        gap: 16px;
        padding: 16px
    }

    .completion-stats .number {
        font-size: 1.5rem
    }

    .completion-stats .label {
        font-size: .8rem
    }

    .completion-actions {
        flex-direction: column;
        gap: 12px
    }

    .completion-actions .btn {
        width: 100%
    }
}

@media (max-width: 375px) {
    .mode-header {
        padding:10px 12px
    }

    .mode-header h1 {
        font-size: .9rem
    }

    .header-stats {
        font-size: .8rem;
        gap: 8px
    }

    .nav-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem
    }

    .mode-content {
        padding: 12px;
        gap: 12px
    }

    .nav-sidebar {
        max-height: 150px
    }

    .completion-icon {
        font-size: 2.5rem
    }

    .completion-card h2 {
        font-size: 1.3rem
    }

    .completion-stats {
        gap: 12px;
        padding: 12px
    }

    .completion-stats .number {
        font-size: 1.3rem
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .mode-header {
        padding:8px 16px
    }

    .mode-content {
        flex-direction: row;
        padding: 12px;
        gap: 12px
    }

    .nav-sidebar {
        width: 200px;
        max-height: none;
        order: 1
    }

    .question-area {
        order: 2
    }

    .next-btn-container {
        bottom: 8px;
        right: 12px;
        left: auto;
        width: auto
    }

    .next-btn {
        width: auto;
        padding: 10px 20px
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .mode-content {
        padding:20px;
        gap: 20px
    }

    .nav-sidebar {
        width: 260px
    }
}

@media (pointer: coarse) {
    .nav-item,.nav-toggle-btn {
        min-width:44px;
        min-height: 44px
    }

    .back-btn {
        min-height: 44px;
        display: flex;
        align-items: center
    }
}

:root.dark-theme .mode-header {
    background: var(--card-bg)
}

:root.dark-theme .mode-header h1 {
    color: #f1f5f9
}

:root.dark-theme .nav-toggle-btn {
    background: #334155;
    color: #94a3b8
}

:root.dark-theme .nav-toggle-btn:hover {
    background: var(--primary-color);
    color: #fff
}

:root.dark-theme .back-btn {
    color: #94a3b8
}

:root.dark-theme .back-btn:hover {
    color: var(--primary-color)
}

:root.dark-theme .progress-text {
    color: #94a3b8
}

:root.dark-theme .completion-stats {
    background: #0f172a80
}

:root.dark-theme .completion-stats .label {
    color: #94a3b8
}

.random-mode {
    min-height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column
}

.random-mode .mode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100
}

.random-mode .header-left,.random-mode .header-right {
    display: flex;
    align-items: center;
    gap: 16px
}

.random-mode .nav-toggle-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all .2s
}

.random-mode .nav-toggle-btn:hover {
    background: var(--primary-color);
    color: #fff
}

.random-mode .back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color .2s
}

.random-mode .back-btn:hover {
    color: var(--primary-color)
}

.random-mode .mode-header h1 {
    font-size: 1.2rem;
    color: var(--text-primary)
}

.random-mode .header-stats {
    display: flex;
    gap: 16px
}

.random-mode .correct-count {
    color: var(--success-color);
    font-weight: 600
}

.random-mode .wrong-count {
    color: var(--error-color);
    font-weight: 600
}

.random-mode .progress-bar {
    position: relative;
    height: 8px;
    background: var(--border-color)
}

.random-mode .progress-fill {
    height: 100%;
    background: linear-gradient(90deg,#f59e0b,#ef4444);
    transition: width .3s ease
}

.random-mode .progress-text {
    position: absolute;
    right: 24px;
    top: 16px;
    font-size: .9rem;
    color: var(--text-secondary)
}

.random-mode .mode-content {
    flex: 1;
    display: flex;
    gap: 24px;
    padding: 24px;
    overflow: hidden
}

.random-mode .nav-sidebar {
    width: 280px;
    flex-shrink: 0;
    animation: slideIn .3s ease
}

.random-mode .question-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0
}

.random-mode .question-area.full-width {
    max-width: 900px;
    margin: 0 auto
}

.random-mode .question-container {
    flex: 1;
    overflow-y: auto
}

.random-mode .next-btn-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    animation: fadeIn .3s ease
}

.random-mode .next-btn {
    padding: 16px 32px;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg)
}

.random-mode .auto-next-hint {
    text-align: center;
    padding: 16px;
    color: var(--success-color);
    font-weight: 500;
    animation: fadeIn .3s ease
}

@media (min-width: 769px) {
    .random-mode {
        height:100dvh;
        overflow: hidden
    }

    .random-mode .mode-content {
        min-height: 0
    }

    .random-mode .nav-sidebar {
        display: flex;
        min-height: 0;
        overflow: hidden
    }

    .random-mode .nav-sidebar .question-nav {
        flex: 1;
        min-height: 0
    }

    .random-mode .question-area {
        min-height: 0;
        overflow: hidden
    }

    .random-mode .question-container {
        min-height: 0
    }

    .random-mode .next-btn-container {
        z-index: 150
    }

    .random-mode .next-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: fit-content;
        max-width: calc(100vw - 48px);
        white-space: nowrap
    }
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-size: 1.2rem;
    color: var(--text-secondary)
}

@media (max-width: 1024px) {
    .random-mode .nav-sidebar {
        width:240px
    }
}

@media (max-width: 768px) {
    .random-mode {
        padding-bottom:80px
    }

    .random-mode .mode-header {
        padding: 10px 14px
    }

    .random-mode .header-left,.random-mode .header-right {
        gap: 8px
    }

    .random-mode .back-btn {
        font-size: .9rem
    }

    .random-mode .back-btn span,.random-mode .nav-toggle-btn {
        display: none
    }

    .random-mode .mode-header h1 {
        font-size: .95rem
    }

    .random-mode .header-stats {
        font-size: .9rem;
        gap: 10px
    }

    .random-mode .progress-text {
        right: 14px;
        top: 12px;
        font-size: .8rem
    }

    .random-mode .mode-content {
        flex-direction: column;
        padding: 14px;
        gap: 14px
    }

    .random-mode .nav-sidebar {
        display: none
    }

    .random-mode .question-area {
        order: 1
    }

    .random-mode .question-container {
        padding: 0
    }

    .random-mode .next-btn-container {
        display: none
    }

    .random-mode .next-btn {
        width: 100%;
        padding: 14px;
        font-size: 1rem;
        min-height: 48px
    }

    .random-mode .auto-next-hint {
        padding: 12px;
        font-size: .9rem;
        margin-bottom: 10px
    }
}

@media (max-width: 375px) {
    .random-mode .mode-header {
        padding:8px 12px
    }

    .random-mode .mode-header h1 {
        font-size: .85rem
    }

    .random-mode .header-stats {
        font-size: .8rem;
        gap: 8px
    }

    .random-mode .nav-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem
    }

    .random-mode .mode-content {
        padding: 12px;
        gap: 12px
    }

    .random-mode .nav-sidebar {
        max-height: 150px
    }

    .random-mode .next-btn {
        padding: 12px;
        font-size: .95rem
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .random-mode .mode-header {
        padding:8px 14px
    }

    .random-mode .mode-content {
        flex-direction: row;
        padding: 12px;
        gap: 12px
    }

    .random-mode .nav-sidebar {
        width: 200px;
        max-height: none;
        order: 1
    }

    .random-mode .question-area {
        order: 2
    }

    .random-mode .next-btn-container {
        bottom: 8px;
        right: 12px;
        left: auto;
        width: auto
    }

    .random-mode .next-btn {
        width: auto;
        padding: 10px 20px
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .random-mode .mode-content {
        padding:20px;
        gap: 20px
    }

    .random-mode .nav-sidebar {
        width: 260px
    }
}

@media (pointer: coarse) {
    .random-mode .nav-toggle-btn {
        min-width:44px;
        min-height: 44px
    }

    .random-mode .back-btn {
        min-height: 44px
    }
}

:root.dark-theme .random-mode .mode-header {
    background: var(--card-bg)
}

:root.dark-theme .random-mode .mode-header h1 {
    color: #f1f5f9
}

:root.dark-theme .random-mode .nav-toggle-btn {
    background: #334155;
    color: #94a3b8
}

:root.dark-theme .random-mode .nav-toggle-btn:hover {
    background: var(--primary-color);
    color: #fff
}

:root.dark-theme .random-mode .back-btn {
    color: #94a3b8
}

:root.dark-theme .random-mode .back-btn:hover {
    color: var(--primary-color)
}

:root.dark-theme .random-mode .progress-text {
    color: #94a3b8
}

:root.dark-theme .random-mode .auto-next-hint {
    color: var(--success-color)
}

.wrong-questions {
    min-height: 100vh;
    background: var(--bg-color);
    padding-bottom: 40px
}

.wrong-questions .mode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100
}

.wrong-questions .back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color .2s
}

.wrong-questions .back-btn:hover {
    color: var(--primary-color)
}

.wrong-questions .mode-header h1 {
    font-size: 1.2rem;
    color: var(--text-primary)
}

.btn-clear {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--error-color);
    color: var(--error-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all .2s
}

.btn-clear:hover {
    background: var(--error-color);
    color: #fff
}

.view-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: #fff;
    border-bottom: 1px solid var(--border-color)
}

.toggle-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    transition: all .2s
}

.toggle-btn.active {
    background: var(--primary-color);
    color: #fff
}

.toggle-btn:hover:not(.active) {
    background: var(--border-color)
}

.wrong-list {
    padding: 24px;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px
}

.wrong-item {
    position: relative
}

.wrong-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px
}

.wrong-item-header .question-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .85rem;
    color: #fff;
    font-weight: 500
}

.wrong-item-header .question-id {
    color: var(--text-secondary);
    font-size: .9rem
}

.remove-btn {
    margin-left: auto;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s
}

.remove-btn:hover {
    background: var(--error-color);
    color: #fff
}

.wrong-item-content {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 16px;
    color: var(--text-primary)
}

.wrong-item-answer {
    display: flex;
    gap: 24px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: .95rem
}

.correct-answer strong {
    color: var(--success-color)
}

.your-answer .wrong-text {
    color: var(--error-color)
}

.wrong-item-analysis {
    margin-top: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg,#f0f9ff,#e0f2fe);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color)
}

.wrong-item-analysis .analysis-label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: .9rem
}

.wrong-item-analysis .analysis-text {
    margin: 8px 0 0;
    font-size: .95rem;
    line-height: 1.6;
    color: var(--text-primary)
}

.practice-mode {
    flex: 1;
    display: flex;
    flex-direction: column
}

.practice-mode .mode-content {
    flex: 1;
    display: flex;
    gap: 24px;
    padding: 24px;
    overflow: hidden
}

.practice-mode .nav-sidebar {
    width: 280px;
    flex-shrink: 0;
    animation: slideIn .3s ease
}

.practice-mode .question-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0
}

.practice-mode .question-area.full-width {
    max-width: 900px;
    margin: 0 auto
}

.practice-mode .progress-info {
    text-align: center;
    padding: 12px;
    color: var(--text-secondary)
}

.practice-mode .question-container {
    flex: 1;
    overflow-y: auto
}

.practice-actions {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%);
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 100
}

.wrong-empty {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg,#667eea,#764ba2)
}

.empty-card {
    text-align: center;
    max-width: 400px
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px
}

.empty-card h2 {
    font-size: 1.5rem;
    margin-bottom: 8px
}

.empty-card p {
    color: var(--text-secondary);
    margin-bottom: 24px
}

@media (min-width: 769px) {
    .wrong-questions {
        height:100dvh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        padding-bottom: 0
    }

    .wrong-list {
        flex: 1;
        width: 100%;
        min-height: 0;
        overflow-y: auto;
        box-sizing: border-box;
        padding-bottom: 40px
    }

    .practice-mode,.practice-mode .mode-content {
        min-height: 0
    }

    .practice-mode .nav-sidebar {
        display: flex;
        min-height: 0;
        overflow: hidden
    }

    .practice-mode .nav-sidebar .question-nav {
        flex: 1;
        min-height: 0
    }

    .practice-mode .question-area {
        min-height: 0;
        overflow: hidden
    }

    .practice-mode .question-container {
        min-height: 0
    }
}

@media (max-width: 1024px) {
    .practice-mode .nav-sidebar {
        width:240px
    }
}

@media (max-width: 768px) {
    .wrong-questions {
        padding-bottom:80px
    }

    .wrong-questions .mode-header {
        padding: 10px 14px
    }

    .wrong-questions .back-btn {
        font-size: .9rem
    }

    .wrong-questions .back-btn span {
        display: none
    }

    .wrong-questions .mode-header h1 {
        font-size: .95rem
    }

    .btn-clear {
        padding: 6px 12px;
        font-size: .85rem
    }

    .view-toggle {
        padding: 12px;
        gap: 6px
    }

    .toggle-btn {
        padding: 8px 16px;
        font-size: .85rem;
        min-height: 40px
    }

    .wrong-list {
        padding: 14px;
        gap: 12px
    }

    .wrong-item {
        padding: 14px
    }

    .wrong-item-header {
        gap: 8px;
        margin-bottom: 10px;
        flex-wrap: wrap
    }

    .wrong-item-header .question-type {
        padding: 3px 10px;
        font-size: .8rem
    }

    .wrong-item-header .question-id {
        font-size: .85rem
    }

    .remove-btn {
        width: 32px;
        height: 32px
    }

    .wrong-item-content {
        font-size: .95rem;
        line-height: 1.5;
        margin-bottom: 12px
    }

    .wrong-item-answer {
        flex-direction: column;
        gap: 6px;
        padding-top: 10px;
        font-size: .9rem
    }

    .wrong-item-analysis {
        margin-top: 10px;
        padding: 10px 12px
    }

    .wrong-item-analysis .analysis-label {
        font-size: .85rem
    }

    .wrong-item-analysis .analysis-text {
        font-size: .9rem
    }

    .practice-mode .mode-content {
        flex-direction: column;
        padding: 14px;
        gap: 14px
    }

    .practice-mode .nav-sidebar {
        display: none
    }

    .practice-mode .question-area {
        order: 1
    }

    .practice-mode .progress-info {
        padding: 10px;
        font-size: .9rem
    }

    .practice-actions {
        display: none
    }

    .wrong-empty {
        padding: 16px
    }

    .empty-card {
        padding: 20px
    }

    .empty-icon {
        font-size: 3rem
    }

    .empty-card h2 {
        font-size: 1.3rem
    }

    .empty-card p {
        font-size: .9rem
    }
}

@media (max-width: 375px) {
    .wrong-questions .mode-header {
        padding:8px 12px
    }

    .wrong-questions .mode-header h1 {
        font-size: .85rem
    }

    .toggle-btn {
        padding: 6px 12px;
        font-size: .8rem
    }

    .wrong-list {
        padding: 12px;
        gap: 10px
    }

    .wrong-item {
        padding: 12px
    }

    .wrong-item-content {
        font-size: .9rem
    }

    .practice-mode .nav-sidebar {
        max-height: 150px
    }

    .practice-actions {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 10px
    }

    .practice-actions .btn {
        padding: 10px;
        font-size: .85rem
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .wrong-questions {
        padding-bottom:60px
    }

    .view-toggle {
        padding: 8px
    }

    .toggle-btn {
        padding: 6px 14px
    }

    .wrong-list,.wrong-item {
        padding: 12px
    }

    .practice-mode .mode-content {
        flex-direction: row;
        padding: 12px;
        gap: 12px
    }

    .practice-mode .nav-sidebar {
        width: 200px;
        max-height: none;
        order: 1
    }

    .practice-mode .question-area {
        order: 2
    }

    .practice-actions {
        left: auto;
        right: 12px;
        bottom: 8px;
        transform: none;
        width: auto;
        padding: 8px
    }

    .practice-actions .btn {
        flex: none;
        padding: 8px 16px
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .wrong-list {
        padding:20px
    }

    .practice-mode .mode-content {
        padding: 20px;
        gap: 20px
    }

    .practice-mode .nav-sidebar {
        width: 260px
    }
}

@media (pointer: coarse) {
    .toggle-btn {
        min-height:44px
    }

    .remove-btn {
        width: 36px;
        height: 36px
    }

    .btn-clear {
        min-height: 44px
    }
}

:root.dark-theme .wrong-questions .mode-header {
    background: var(--card-bg)
}

:root.dark-theme .wrong-questions .mode-header h1 {
    color: #f1f5f9
}

:root.dark-theme .wrong-questions .back-btn {
    color: #94a3b8
}

:root.dark-theme .wrong-questions .back-btn:hover {
    color: var(--primary-color)
}

:root.dark-theme .view-toggle {
    background: var(--card-bg)
}

:root.dark-theme .toggle-btn {
    color: #94a3b8
}

:root.dark-theme .toggle-btn.active {
    background: var(--primary-color);
    color: #fff
}

:root.dark-theme .wrong-item-content {
    color: #e2e8f0
}

:root.dark-theme .wrong-item-answer {
    border-top-color: var(--border-color)
}

:root.dark-theme .wrong-item-analysis {
    background: linear-gradient(135deg,#6366f126,#7c3aed1a)
}

:root.dark-theme .wrong-item-analysis .analysis-text {
    color: #e2e8f0
}

:root.dark-theme .practice-mode .progress-info {
    color: #94a3b8
}

:root.dark-theme .btn-clear {
    border-color: var(--error-color);
    color: var(--error-color)
}

:root.dark-theme .btn-clear:hover {
    background: var(--error-color);
    color: #fff
}

.exam-setup {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg,#667eea,#764ba2)
}

.loading-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--bg-color)
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin .8s linear infinite
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.setup-card {
    text-align: center;
    max-width: 500px;
    width: 100%
}

.setup-icon {
    font-size: 4rem;
    margin-bottom: 16px
}

.setup-card h2 {
    font-size: 2rem;
    margin-bottom: 8px
}

.setup-card>p {
    color: var(--text-secondary);
    margin-bottom: 24px
}

.exam-rules {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    text-align: left;
    margin-bottom: 24px
}

.exam-rules h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-primary)
}

.exam-rules ul {
    list-style: none;
    padding: 0
}

.exam-rules li {
    padding: 8px 0 8px 20px;
    position: relative;
    color: var(--text-secondary);
    font-size: .95rem
}

.exam-rules li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700
}

.setup-actions {
    display: flex;
    gap: 16px;
    justify-content: center
}

.exam-mode {
    min-height: 100vh;
    background: var(--bg-color)
}

.exam-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100
}

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

.exam-title {
    font-weight: 600;
    font-size: 1.1rem
}

.question-progress {
    color: var(--text-secondary);
    font-size: .9rem
}

.time-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f1f5f9;
    border-radius: 8px
}

.time-icon {
    font-size: 1.2rem
}

.time-value {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: monospace
}

.time-value.warning {
    color: var(--error-color);
    animation: pulse 1s infinite
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px
}

.answered-count {
    color: var(--text-secondary);
    font-size: .9rem
}

.btn-submit {
    padding: 8px 20px;
    background: var(--error-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s
}

.btn-submit:hover {
    background: #dc2626
}

.exam-mode .progress-bar {
    height: 4px;
    background: var(--border-color)
}

.exam-mode .progress-fill {
    height: 100%;
    background: linear-gradient(90deg,var(--success-color),#059669);
    transition: width .3s ease
}

.exam-content {
    display: flex;
    gap: 24px;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto
}

.question-panel {
    flex: 1;
    min-width: 0;
    animation: fadeIn .3s ease
}

.nav-sidebar {
    width: 300px;
    flex-shrink: 0;
    animation: slideIn .3s ease
}

@media (min-width: 769px) {
    .exam-mode {
        height:100dvh;
        overflow: hidden;
        display: flex;
        flex-direction: column
    }

    .exam-content {
        flex: 1;
        min-height: 0;
        overflow: hidden
    }

    .nav-sidebar {
        display: flex;
        min-height: 0;
        overflow: hidden
    }

    .nav-sidebar .question-nav {
        flex: 1;
        min-height: 0
    }

    .question-panel {
        min-height: 0;
        overflow-y: auto
    }
}

.exam-result {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg,#667eea,#764ba2)
}

.result-card {
    text-align: center;
    max-width: 600px;
    width: 100%
}

.result-header {
    margin-bottom: 24px
}

.result-score {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 8px
}

.result-score.pass {
    color: var(--success-color)
}

.result-score.fail {
    color: var(--error-color)
}

.score-unit {
    font-size: 1.5rem;
    font-weight: 400
}

.result-header h2 {
    font-size: 1.5rem
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px
}

.result-stats .stat-item {
    text-align: center
}

.result-stats .stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px
}

.result-stats .stat-item.correct .stat-number {
    color: var(--success-color)
}

.result-stats .stat-item.wrong .stat-number {
    color: var(--error-color)
}

.result-stats .stat-item.unanswered .stat-number {
    color: var(--warning-color)
}

.result-stats .stat-item.time .stat-number {
    color: var(--primary-color)
}

.result-stats .stat-label {
    font-size: .85rem;
    color: var(--text-secondary)
}

.result-details {
    margin-bottom: 24px
}

.result-details h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-secondary)
}

.answer-grid {
    display: grid;
    grid-template-columns: repeat(10,1fr);
    gap: 8px
}

.answer-item {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 600;
    border: 2px solid var(--border-color)
}

.answer-item.correct {
    background: var(--success-color);
    border-color: var(--success-color);
    color: #fff
}

.answer-item.wrong {
    background: var(--error-color);
    border-color: var(--error-color);
    color: #fff
}

.answer-item.unanswered {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: #fff
}

.result-actions {
    display: flex;
    gap: 16px;
    justify-content: center
}

@media (max-width: 1024px) {
    .nav-sidebar {
        width:260px
    }
}

@media (max-width: 768px) {
    .exam-mode {
        padding-bottom:80px
    }

    .exam-setup {
        padding: 16px
    }

    .setup-card {
        padding: 20px
    }

    .setup-icon {
        font-size: 3rem;
        margin-bottom: 12px
    }

    .setup-card h2 {
        font-size: 1.5rem
    }

    .setup-card>p {
        font-size: .9rem;
        margin-bottom: 20px
    }

    .exam-rules {
        padding: 16px;
        margin-bottom: 20px
    }

    .exam-rules h3 {
        font-size: .9rem;
        margin-bottom: 10px
    }

    .exam-rules li {
        padding: 6px 0 6px 16px;
        font-size: .85rem
    }

    .exam-header {
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 8px
    }

    .header-left {
        gap: 8px;
        flex: 0 0 auto
    }

    .exam-title {
        font-size: .95rem
    }

    .question-progress {
        font-size: .8rem
    }

    .time-display {
        padding: 6px 12px;
        gap: 4px
    }

    .time-icon,.time-value {
        font-size: 1rem
    }

    .header-right {
        flex: 0 0 auto;
        gap: 10px
    }

    .answered-count {
        font-size: .8rem
    }

    .btn-submit {
        padding: 8px 14px;
        font-size: .85rem
    }

    .header-center {
        order: 3;
        width: 100%;
        display: flex;
        justify-content: center
    }

    .exam-content {
        flex-direction: column;
        padding: 14px;
        gap: 14px
    }

    .nav-sidebar {
        display: none
    }

    .question-panel {
        order: 1
    }

    .exam-result {
        padding: 16px
    }

    .result-card {
        padding: 20px
    }

    .result-score {
        font-size: 4rem
    }

    .score-unit {
        font-size: 1.2rem
    }

    .result-header h2 {
        font-size: 1.3rem
    }

    .result-stats {
        grid-template-columns: repeat(2,1fr);
        gap: 12px;
        padding: 16px
    }

    .result-stats .stat-number {
        font-size: 1.5rem
    }

    .result-stats .stat-label {
        font-size: .8rem
    }

    .result-details h3 {
        font-size: .9rem;
        margin-bottom: 12px
    }

    .answer-grid {
        grid-template-columns: repeat(8,1fr);
        gap: 6px
    }

    .answer-item {
        font-size: .75rem
    }

    .setup-actions,.result-actions {
        flex-direction: column;
        gap: 12px
    }

    .setup-actions .btn,.result-actions .btn {
        width: 100%;
        min-height: 48px
    }
}

@media (max-width: 375px) {
    .setup-card {
        padding:16px
    }

    .setup-icon {
        font-size: 2.5rem
    }

    .setup-card h2 {
        font-size: 1.3rem
    }

    .exam-rules {
        padding: 12px
    }

    .exam-rules li {
        font-size: .8rem
    }

    .exam-header {
        padding: 8px 12px
    }

    .exam-title {
        font-size: .85rem
    }

    .time-value {
        font-size: .9rem
    }

    .btn-submit {
        padding: 6px 12px;
        font-size: .8rem
    }

    .nav-panel {
        max-height: 160px
    }

    .result-score {
        font-size: 3rem
    }

    .answer-grid {
        grid-template-columns: repeat(10,1fr);
        gap: 4px
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .exam-setup {
        padding:12px
    }

    .setup-card {
        padding: 16px
    }

    .setup-icon {
        font-size: 2rem;
        margin-bottom: 8px
    }

    .setup-card h2 {
        font-size: 1.3rem
    }

    .exam-rules {
        padding: 12px;
        margin-bottom: 16px
    }

    .exam-rules li {
        padding: 4px 0;
        font-size: .8rem
    }

    .exam-content {
        flex-direction: row;
        padding: 12px;
        gap: 12px
    }

    .nav-sidebar {
        width: 220px;
        max-height: none;
        order: 1
    }

    .question-panel {
        order: 2
    }

    .result-stats {
        grid-template-columns: repeat(4,1fr);
        gap: 10px;
        padding: 12px
    }

    .result-stats .stat-number {
        font-size: 1.3rem
    }

    .answer-grid {
        grid-template-columns: repeat(10,1fr);
        gap: 4px
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .exam-content {
        padding:20px;
        gap: 20px
    }

    .nav-sidebar {
        width: 280px
    }
}

@media (pointer: coarse) {
    .btn-submit {
        min-height:44px
    }

    .answer-item {
        min-width: 32px;
        min-height: 32px
    }
}

:root.dark-theme .exam-header {
    background: var(--card-bg)
}

:root.dark-theme .exam-title {
    color: #f1f5f9
}

:root.dark-theme .question-progress {
    color: #94a3b8
}

:root.dark-theme .time-display {
    background: #33415580
}

:root.dark-theme .time-value {
    color: #f1f5f9
}

:root.dark-theme .answered-count {
    color: #94a3b8
}

:root.dark-theme .exam-rules {
    background: #0f172a80
}

:root.dark-theme .exam-rules h3 {
    color: #f1f5f9
}

:root.dark-theme .exam-rules li {
    color: #cbd5e1
}

:root.dark-theme .result-stats {
    background: #0f172a80
}

:root.dark-theme .result-details h3 {
    color: #94a3b8
}

:root.dark-theme .answer-item {
    border-color: #475569;
    color: #e2e8f0
}

.memorize-mode {
    min-height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column
}

.memorize-mode .mode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100
}

.memorize-mode .header-left,.memorize-mode .header-right {
    display: flex;
    align-items: center;
    gap: 16px
}

.memorize-mode .nav-toggle-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all .2s
}

.memorize-mode .nav-toggle-btn:hover {
    background: var(--primary-color);
    color: #fff
}

.memorize-mode .back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color .2s
}

.memorize-mode .back-btn:hover {
    color: var(--primary-color)
}

.memorize-mode .mode-header h1 {
    font-size: 1.2rem;
    color: var(--text-primary)
}

.memorize-mode .header-stats {
    display: flex;
    gap: 16px
}

.memorize-mode .viewed-count {
    color: var(--primary-color);
    font-weight: 600
}

.memorize-mode .progress-bar {
    position: relative;
    height: 8px;
    background: var(--border-color)
}

.memorize-mode .progress-fill {
    height: 100%;
    background: linear-gradient(90deg,var(--primary-color),#7c3aed);
    transition: width .3s ease
}

.memorize-mode .progress-text {
    position: absolute;
    right: 24px;
    top: 16px;
    font-size: .9rem;
    color: var(--text-secondary)
}

.memorize-mode .mode-content {
    flex: 1;
    display: flex;
    gap: 24px;
    padding: 24px;
    overflow: hidden
}

.memorize-mode .nav-sidebar {
    width: 280px;
    flex-shrink: 0;
    animation: slideIn .3s ease
}

.memorize-mode .question-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0
}

.memorize-mode .question-area.full-width {
    max-width: 900px;
    margin: 0 auto
}

.memorize-mode .question-container {
    flex: 1;
    overflow-y: auto
}

.memorize-mode .next-btn-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    animation: fadeIn .3s ease
}

.memorize-mode .next-btn {
    padding: 16px 32px;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg)
}

.memorize-mode .next-btn:disabled {
    opacity: .5;
    cursor: not-allowed
}

.memorize-mode .completion-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg,#667eea,#764ba2)
}

.memorize-mode .completion-card {
    text-align: center;
    max-width: 500px;
    width: 100%
}

.memorize-mode .completion-icon {
    font-size: 4rem;
    margin-bottom: 16px
}

.memorize-mode .completion-card h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--text-primary)
}

.memorize-mode .completion-card>p {
    color: var(--text-secondary);
    margin-bottom: 24px
}

.memorize-mode .completion-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px
}

.memorize-mode .completion-stats .stat {
    text-align: center
}

.memorize-mode .completion-stats .number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--primary-color)
}

.memorize-mode .completion-stats .label {
    font-size: .9rem;
    color: var(--text-secondary)
}

.memorize-mode .completion-actions {
    display: flex;
    gap: 16px;
    justify-content: center
}

@media (min-width: 769px) {
    .memorize-mode {
        height:100dvh;
        overflow: hidden
    }

    .memorize-mode .mode-content {
        min-height: 0
    }

    .memorize-mode .nav-sidebar {
        display: flex;
        min-height: 0;
        overflow: hidden
    }

    .memorize-mode .nav-sidebar .question-nav {
        flex: 1;
        min-height: 0
    }

    .memorize-mode .question-area {
        min-height: 0;
        overflow: hidden
    }

    .memorize-mode .question-container {
        min-height: 0
    }

    .memorize-mode .next-btn-container {
        z-index: 150
    }

    .memorize-mode .next-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: fit-content;
        max-width: calc(100vw - 48px);
        white-space: nowrap
    }
}

@media (max-width: 1024px) {
    .memorize-mode .nav-sidebar {
        width:240px
    }
}

@media (max-width: 768px) {
    .memorize-mode {
        padding-bottom:80px
    }

    .memorize-mode .mode-header {
        padding: 12px 16px
    }

    .memorize-mode .mode-header h1 {
        font-size: 1rem
    }

    .memorize-mode .header-left,.memorize-mode .header-right {
        gap: 8px
    }

    .memorize-mode .back-btn {
        font-size: .9rem
    }

    .memorize-mode .back-btn span {
        display: none
    }

    .memorize-mode .nav-toggle-btn {
        width: 40px;
        height: 40px
    }

    .memorize-mode .header-stats {
        font-size: .9rem;
        gap: 12px
    }

    .memorize-mode .progress-text {
        right: 16px;
        top: 12px;
        font-size: .8rem
    }

    .memorize-mode .mode-content {
        flex-direction: column;
        padding: 16px;
        gap: 16px
    }

    .memorize-mode .nav-sidebar {
        width: 100%;
        max-height: 180px;
        order: 2;
        flex-shrink: 0
    }

    .memorize-mode .question-area {
        order: 1;
        flex: 1;
        min-height: 0
    }

    .memorize-mode .question-container {
        padding: 0
    }

    .memorize-mode .next-btn-container {
        position: fixed;
        bottom: 16px;
        right: 16px;
        left: 16px;
        z-index: 50
    }

    .memorize-mode .next-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 1rem
    }

    .memorize-mode .completion-page {
        padding: 16px
    }

    .memorize-mode .completion-card {
        padding: 20px
    }

    .memorize-mode .completion-icon {
        font-size: 3rem
    }

    .memorize-mode .completion-card h2 {
        font-size: 1.5rem
    }

    .memorize-mode .completion-card>p {
        font-size: .9rem;
        margin-bottom: 20px
    }

    .memorize-mode .completion-stats {
        gap: 16px;
        padding: 16px
    }

    .memorize-mode .completion-stats .number {
        font-size: 1.5rem
    }

    .memorize-mode .completion-stats .label {
        font-size: .8rem
    }

    .memorize-mode .completion-actions {
        flex-direction: column;
        gap: 12px
    }

    .memorize-mode .completion-actions .btn {
        width: 100%
    }
}

@media (max-width: 375px) {
    .memorize-mode .mode-header {
        padding:10px 12px
    }

    .memorize-mode .mode-header h1 {
        font-size: .9rem
    }

    .memorize-mode .header-stats {
        font-size: .8rem;
        gap: 8px
    }

    .memorize-mode .nav-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem
    }

    .memorize-mode .mode-content {
        padding: 12px;
        gap: 12px
    }

    .memorize-mode .nav-sidebar {
        max-height: 150px
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .memorize-mode .mode-header {
        padding:8px 16px
    }

    .memorize-mode .mode-content {
        flex-direction: row;
        padding: 12px;
        gap: 12px
    }

    .memorize-mode .nav-sidebar {
        width: 200px;
        max-height: none;
        order: 1
    }

    .memorize-mode .question-area {
        order: 2
    }

    .memorize-mode .next-btn-container {
        bottom: 8px;
        right: 12px;
        left: auto;
        width: auto
    }

    .memorize-mode .next-btn {
        width: auto;
        padding: 10px 20px
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .memorize-mode .mode-content {
        padding:20px;
        gap: 20px
    }

    .memorize-mode .nav-sidebar {
        width: 260px
    }
}

:root.dark-theme .memorize-mode .mode-header {
    background: var(--card-bg)
}

:root.dark-theme .memorize-mode .mode-header h1 {
    color: #f1f5f9
}

:root.dark-theme .memorize-mode .nav-toggle-btn {
    background: #334155;
    color: #94a3b8
}

:root.dark-theme .memorize-mode .nav-toggle-btn:hover {
    background: var(--primary-color);
    color: #fff
}

:root.dark-theme .memorize-mode .back-btn {
    color: #94a3b8
}

:root.dark-theme .memorize-mode .back-btn:hover {
    color: var(--primary-color)
}

:root.dark-theme .memorize-mode .progress-text {
    color: #94a3b8
}

:root.dark-theme .memorize-mode .completion-stats {
    background: #0f172a80
}

:root.dark-theme .memorize-mode .completion-stats .label {
    color: #94a3b8
}

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

html {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation
}

body {
    overscroll-behavior: none
}

:root,:root.light-theme {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --hover-bg: #f1f5f9;
    --active-bg: #e2e8f0;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --overlay-bg: rgba(0, 0, 0, .5);
    --scrollbar-bg: #f1f5f9;
    --scrollbar-thumb: #cbd5e1
}

:root.dark-theme {
    --primary-color: #818cf8;
    --primary-hover: #6366f1;
    --success-color: #34d399;
    --error-color: #f87171;
    --warning-color: #fbbf24;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / .3), 0 2px 4px -2px rgb(0 0 0 / .2);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .4), 0 4px 6px -4px rgb(0 0 0 / .3);
    --input-bg: #1e293b;
    --input-border: #475569;
    --hover-bg: #334155;
    --active-bg: #475569;
    --gradient-start: #4f46e5;
    --gradient-end: #7c3aed;
    --overlay-bg: rgba(0, 0, 0, .7);
    --scrollbar-bg: #1e293b;
    --scrollbar-thumb: #475569
}

* {
    transition: background-color .3s ease,border-color .3s ease,color .3s ease
}

body {
    font-family: Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh
}

.app {
    min-height: 100vh
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
    text-decoration: none
}

.btn-primary {
    background: linear-gradient(135deg,var(--primary-color),#7c3aed);
    color: #fff;
    box-shadow: 0 4px 14px #4f46e566
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px #4f46e580
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color)
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color)
}

.btn-success {
    background: linear-gradient(135deg,var(--success-color),#059669);
    color: #fff
}

.btn-error {
    background: linear-gradient(135deg,var(--error-color),#dc2626);
    color: #fff
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none!important
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all .3s ease
}

.card:hover {
    box-shadow: var(--shadow-lg)
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px)
    }

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

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translate(-20px)
    }

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

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

    50% {
        transform: scale(1.05)
    }
}

@keyframes shake {
    0%,to {
        transform: translate(0)
    }

    25% {
        transform: translate(-5px)
    }

    75% {
        transform: translate(5px)
    }
}

.fade-in {
    animation: fadeIn .5s ease forwards
}

.slide-in {
    animation: slideIn .3s ease forwards
}

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

    .btn {
        padding: 14px 24px;
        font-size: 16px;
        min-height: 48px
    }

    .card {
        padding: 16px;
        border-radius: 12px
    }
}

@media (max-width: 768px) and (pointer: coarse) {
    .btn {
        min-height:44px;
        min-width: 44px
    }

    button,a,input,select,textarea {
        min-height: 44px
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding:0 24px
    }

    .card {
        padding: 20px
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .card {
        padding:12px
    }

    .btn {
        padding: 8px 16px
    }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body {
        padding-bottom:env(safe-area-inset-bottom)
    }
}
