/* 랜딩 화면 스타일 */
.landing-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: -webkit-fill-available;
    background: #1a1a1a;
    z-index: 1000;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -webkit-perspective: 1000;
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
    contain: layout style paint;
    isolation: isolate;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.landing-screen.slide-up {
    animation: slideUpAnimation 1s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

@keyframes slideUpAnimation {
    0% {
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
        -moz-transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(0, calc(-100% - 20px), 0);
        -webkit-transform: translate3d(0, calc(-100% - 20px), 0);
        -moz-transform: translate3d(0, calc(-100% - 20px), 0);
    }
}

/* Firefox 전용 최적화 */
@-moz-document url-prefix() {
    .landing-screen {
        image-rendering: -moz-crisp-edges;
    }
}

.landing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    height: -webkit-fill-available;
    transition: background-color 0.5s ease;
}

.landing-container.on {
    background-color: #fff;
}

.landing-title {
    font-size: 3em;
    margin-bottom: 2em;
    color: #666;
    transition: color 0.5s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
}

.landing-container.on .landing-title {
    color: #000;
}

.switch-container {
    position: relative;
}

.switch-input {
    display: none;
}

.switch-label {
    display: block;
    width: 200px;
    height: 100px;
    background: #333;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s ease;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.4), inset 0 -5px 15px rgba(255,255,255,0.1);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
}

.switch-input:checked + .switch-label {
    background: #4CAF50;
}

.switch-toggle {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
}

.switch-input:checked + .switch-label .switch-toggle {
    transform: translate3d(100px, 0, 0);
    -webkit-transform: translate3d(100px, 0, 0);
    -moz-transform: translate3d(100px, 0, 0);
}

/* 메인 화면 스타일 */
.main-screen {
    position: relative;
    z-index: 1;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    contain: layout style paint;
    background-color: #f8f9fb;
}

.main-screen.hidden {
    display: none;
}

/* 하이라이트 효과 */
.highlight {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.highlight::before {
    content: '';
    position: absolute;
    left: -0.1em;
    right: -0.1em;
    bottom: 0.1em;
    height: 0.5em;
    background: rgba(59, 130, 246, 0.3);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
}

/* 애니메이션 활성화 클래스 */
.highlight.animate::before {
    animation: highlightExpand 1s ease-out forwards;
}

/* 이미 방문한 경우 바로 표시 */
.highlight.instant::before {
    transform: scaleX(1);
}

@keyframes highlightExpand {
    to {
        transform: scaleX(1);
    }
}
