:root {
    --vh: 1vh;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Libre Franklin-Regular', 'Helvetica', 'Arial', sans-serif;
    background: #04060b;
    position: relative;
}

@font-face {
    font-family: 'Libre Franklin-Bold';
    src: url('../font/LibreFranklin-Bold-4.ttf') format('truetype');
}

@font-face {
    font-family: 'Libre Franklin-Medium';
    src: url('../font/LibreFranklin-Medium-13.ttf') format('truetype');
}

@font-face {
    font-family: 'Libre Franklin-Regular';
    src: url('../font/LibreFranklin-Regular-15.ttf') format('truetype');
}

@font-face {
    font-family: 'Libre Franklin-SemiBold';
    src: url('../font/LibreFranklin-SemiBold-16.ttf') format('truetype');
}

@font-face {
    font-family: 'Londrina Solid-Black';
    src: url('../font/londrina-solid-black.ttf') format('truetype');
}

@font-face {
    font-family: 'Londrina Solid-Regular';
    src: url('../font/LondrinaSolid-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Londrina Solid-Light';
    src: url('../font/londrina-solid-light.ttf') format('truetype');
}

@font-face {
    font-family: 'Lilita One';
    src: url('../font/LilitaOne.woff2.ttf') format('truetype');
}

@font-face {
    font-family: 'NanumGothic-ExtraBold';
    src: url('../font/NanumGothic-ExtraBold.ttf') format('truetype');
}

.frame-background {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    height: calc(var(--vh, 1vh) * 100);
    background: url(../pic/24-beijing.png) center center / cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    position: fixed;
    top: 0;
    left: 0;
}

.box-white {
    width: calc(100% - 16px);
    max-width: 500px;
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
    height: calc(var(--vh, 1vh) * 100 - 16px);
    max-height: 800px;
    background: #fff;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.desc-content {
    background: rgba(244, 244, 244, 0.94);
    border-radius: 20px 20px 0 0;
    padding: 12px 10px;
    flex-shrink: 0;
}

.title {
    font-family: NanumGothic-ExtraBold;
    font-weight: 800;
    font-size: clamp(1rem, 4vw, 1.3rem);
    color: #E20305;
    text-align: center;
    line-height: 1.2;
}

.subtitle {
    background: #E20305;
    border-radius: 6px;
    font-family: NanumGothic-ExtraBold;
    font-weight: 800;
    font-size: clamp(1rem, 4.5vw, 1.35rem);
    color: #FFFFFF;
    text-align: center;
    width: 70%;
    padding: 3px 8px;
    margin: 4px auto 0;
    line-height: 1.2;
}

.desc-main {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
    gap: 8px;
}

.desc-main > div:first-child {
    width: 35%;
    max-width: 120px;
}

.desc-main img {
    width: 100%;
    height: auto;
}

.desc-title {
    font-family: Libre Franklin-Bold;
    font-weight: bold;
    font-size: clamp(0.9rem, 3.5vw, 1.15rem);
    color: #0F172A;
    border-bottom: 1px solid #0F172A;
    line-height: 1.2;
    display: inline-block;
}

.desc-subtitle {
    font-family: Libre Franklin-SemiBold;
    font-weight: bold;
    font-size: clamp(0.75rem, 3vw, 0.95rem);
    color: #0F172A;
    margin-top: 4px;
    line-height: 1.3;
}

.color1, .color2 {
    font-family: Libre Franklin-Bold;
}

.color1 {
    color: #E20305;
}

.color2 {
    color: #32B745;
}

.desc-bottom-word {
    font-family: Libre Franklin-Bold;
    font-weight: bold;
    font-size: clamp(0.7rem, 2.8vw, 0.9rem);
    color: #0F172A;
    text-align: center;
    margin-top: 6px;
    line-height: 1.3;
    padding: 0 8px;
}

.question-main-box {
    padding: 8px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.question-main-box > div:first-child {
    text-align: center;
    flex-shrink: 0;
}

.question-main-box img {
    height: clamp(35px, 8vh, 50px);
    width: auto;
}

.question {
    font-family: Libre Franklin-Bold;
    font-weight: bold;
    font-size: clamp(0.9rem, 3.5vw, 1.15rem);
    color: #0F172A;
    line-height: 1.35;
    text-align: center;
    width: 95%;
    margin: 8px auto 10px;
}

.space-y-4 {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    justify-content: flex-start;
}

.mt-10 {
    margin-top: 6px;
}

.german-option-card {
    background: #F1F5F9;
    border: 2px solid #C3DAF8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 8px;
    padding: clamp(10px, 2.2vh, 14px) 10px;
    flex-shrink: 0;
}

.german-option-text {
    font-family: Libre Franklin-Bold;
    font-weight: bold;
    font-size: clamp(0.8rem, 3vw, 0.95rem);
    color: #0F172A;
    line-height: 1.3;
}

.answer {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #606060;
    border-radius: 8px;
    padding: clamp(8px, 1.8vh, 12px) 12px;
    font-family: Lilita One;
    font-weight: 400;
    font-size: clamp(0.95rem, 3.5vw, 1.2rem);
    color: #FFFFFF;
    margin-top: 8px;
    cursor: pointer;
    gap: 6px;
    flex-shrink: 0;
}

.answer img {
    height: clamp(18px, 4vw, 24px);
    width: auto;
}

.german-error-text {
    text-align: center;
    color: #E20305 !important;
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    padding: 4px 0;
    display: none;
    line-height: 1.2;
}

.content-bottom {
    font-family: Libre Franklin-Regular;
    font-weight: 400;
    font-size: clamp(0.65rem, 2.3vw, 0.75rem);
    color: #0F172A;
    text-align: center;
    padding-top: 6px;
    padding-bottom: 4px;
    line-height: 1.2;
    flex-shrink: 0;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.gap-4 {
    gap: 12px;
}

.modern-radio-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.modern-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
    background: #ffffff;
}

.radio-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #475569;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.radio-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(71, 85, 105, 0.1);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.3s ease;
}

.active {
    background: linear-gradient(180deg, #22C76A 0%, #1D9A7C 100%) !important;
    border: none !important;
}

.answer-active {
    background: linear-gradient(270deg, #008CFF 0%, #05EFEF 100%), rgba(255, 255, 255, 0.2);
}

.box.german-option-card.active .modern-radio,
.box.german-option-card.modern-option-card.active .modern-radio {
    border-color: #D4AF37 !important;
    background: #ffffff !important;
}

.box.german-option-card.active .radio-dot,
.box.german-option-card.modern-option-card.active .radio-dot {
    background: #D4AF37 !important;
    transform: translate(-50%, -50%) scale(1) !important;
}

.img2 {
    display: none;
}

@media screen and (max-height: 700px) {
    .desc-content {
        padding: 10px 8px;
    }
    
    .desc-main {
        margin-top: 6px;
    }
    
    .desc-bottom-word {
        margin-top: 5px;
    }
    
    .question-main-box {
        padding: 8px;
    }
    
    .question {
        margin: 5px auto 6px;
    }
    
    .space-y-4 {
        gap: 6px;
    }
    
    .german-option-card {
        padding: 7px 8px;
    }
}

@media screen and (max-height: 600px) {
    .box-white {
        border-radius: 16px;
    }
    
    .desc-content {
        padding: 8px 6px;
        border-radius: 16px 16px 0 0;
    }
    
    .title {
        font-size: 0.95rem;
    }
    
    .subtitle {
        font-size: 1rem;
        padding: 2px 6px;
    }
    
    .desc-main {
        margin-top: 5px;
        gap: 6px;
    }
    
    .desc-main > div:first-child {
        width: 30%;
        max-width: 100px;
    }
    
    .desc-title {
        font-size: 0.85rem;
    }
    
    .desc-subtitle {
        font-size: 0.7rem;
    }
    
    .desc-bottom-word {
        font-size: 0.65rem;
        margin-top: 4px;
    }
    
    .question-main-box {
        padding: 6px;
    }
    
    .question-main-box img {
        height: 30px;
    }
    
    .question {
        font-size: 0.8rem;
        margin: 4px auto 5px;
    }
    
    .german-option-card {
        padding: 6px 8px;
    }
    
    .german-option-text {
        font-size: 0.75rem;
    }
    
    .answer {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
    
    .answer img {
        height: 16px;
    }
    
    .content-bottom {
        font-size: 0.6rem;
        padding-top: 4px;
    }
    
    .space-y-4 {
        gap: 5px;
    }
    
    .mt-10 {
        margin-top: 5px;
    }
}

@media screen and (max-height: 500px) {
    .desc-main {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .desc-main > div:first-child {
        width: 25%;
        max-width: 80px;
    }
    
    .question-main-box img {
        height: 25px;
    }
    
    .german-option-card {
        padding: 5px 6px;
    }
    
    .answer {
        padding: 4px 8px;
        font-size: 0.85rem;
    }
    
    .box-white {
        height: calc(var(--vh, 1vh) * 100 - 12px);
    }
}

@media screen and (max-width: 360px) {
    .desc-main {
        flex-direction: column;
        align-items: center;
    }
    
    .desc-main > div:first-child {
        width: 30%;
        max-width: 100px;
    }
    
    .desc-main > div:last-child {
        text-align: center;
    }
}

@media screen and (orientation: landscape) and (max-height: 450px) {
    .box-white {
        max-width: 600px;
        height: calc(100vh - 12px);
        height: calc(100dvh - 12px);
        height: calc(var(--vh, 1vh) * 100 - 12px);
    }
    
    .desc-content {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 6px 10px;
    }
    
    .desc-content > div:first-child {
        flex: 0 0 auto;
    }
    
    .desc-main {
        flex: 1;
        margin-top: 0;
    }
    
    .desc-bottom-word {
        display: none;
    }
    
    .question-main-box {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .question-main-box > div:first-child {
        display: none;
    }
    
    .question {
        flex: 0 0 auto;
        width: auto;
        margin: 0;
        font-size: 0.75rem;
    }
    
    .space-y-4 {
        flex-direction: row;
        gap: 8px;
    }
    
    .german-option-card {
        flex: 1;
        margin-bottom: 0;
    }
    
    .answer {
        flex: 0 0 auto;
    }
    
    .content-bottom {
        display: none;
    }
}