/* 기본 레이아웃 초기화 */
html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* 컨테이너 */
.container {
    width: 100vw;
    max-width: 100%;
    height: 100vh;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* 언어 선택 공통 스타일 */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}

.lang-icon {
    width: 18px;
    height: 18px;
    color: #111827 !important;
    opacity: 1 !important;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.lang-switcher:hover .lang-icon {
    color: #111827 !important;
}

.lang-select {
    border: none;
    background: transparent !important;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    opacity: 1 !important;
    cursor: pointer;
    outline: none;
    appearance: none;
    padding: 4px 20px 4px 6px;
    min-width: 80px;
    letter-spacing: 0.5px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 14px;
    transition: all 0.3s ease;
}

.lang-select:hover {
    color: #111827 !important;
}

.lang-select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 6px;
}

.lang-select option {
    padding: 8px 12px;
    background: white !important;
    color: #111827 !important;
    font-weight: 500;
    border-radius: 6px;
    margin: 2px 0;
}

/* 언어 변경 로딩 상태 */
.lang-switcher.changing {
    opacity: 0.7;
    pointer-events: none;
}

.lang-switcher.changing::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }
    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* 로그인 하단 정렬 */
.login-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 0 2px;
    width: 100%;
    font-size: 13px;
    flex-wrap: wrap;
    overflow-x: hidden;
}

.bottom-left-text {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    min-width: 0;
    flex-shrink: 1;
}

.bottom-left-text a {
    font-weight: 600;
    color: #111827;
    text-decoration: none;
}

.bottom-left-text a:hover {
    text-decoration: underline;
}

.bottom-right-lang {
    color: #111827 !important;
    opacity: 1 !important;
    margin-left: auto;
    padding-left: 12px;
}

.bottom-area .right-lang {
    margin-top: 44px
}

.bottom-right-lang .lang-switcher {
    position: static !important;
    box-shadow: none;
    background: none !important;
    padding: 0;
    border: none;
    gap: 4px !important;
}

/* 반응형 대응 */
@media (max-width: 768px) {
    .lang-icon {
        width: 16px;
        height: 16px;
    }

    .lang-select {
        font-size: 13px;
        min-width: 70px;
        padding: 3px 18px 3px 6px;
        background-size: 12px;
    }

    .container {
        margin-top: 35px;
    }

    .login-bottom-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .lang-icon {
        width: 14px;
        height: 14px;
    }

    .lang-select {
        font-size: 12px;
        min-width: 60px;
        padding: 2px 16px 2px 4px;
        background-size: 10px;
    }

    .container {
        margin-top: 30px;
    }
}

@media (min-width: 1200px) {
    .lang-icon {
        width: 20px;
        height: 20px;
    }

    .lang-select {
        font-size: 15px;
        min-width: 90px;
        padding: 5px 22px 5px 10px;
        background-size: 16px;
    }
}

/* 다크 모드 대응 */
@media (prefers-color-scheme: dark) {
    .lang-select {
        color: #111827;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    }

    .lang-select:hover {
        color: #111827;
    }

    .lang-select option {
        background: #1f2937;
        color: #f3f4f6;
    }

    .lang-icon {
        color: #111827;
    }

    .lang-switcher:hover .lang-icon {
        color: #111827 !important;
    }
}

/* 고대비 대응 */
@media (prefers-contrast: high) {
    .lang-select {
        color: #000 !important;
    }

    .lang-select:focus {
        outline: 3px solid #0066cc;
    }
}

/* 애니메이션 최소화 */
@media (prefers-reduced-motion: reduce) {
    .lang-switcher,
    .lang-select,
    .lang-icon {
        transition: none;
    }

    .lang-switcher.changing::after {
        animation: none;
    }
}

.invite-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    width: 100%;
    max-width: 500px;
    padding: 0 12px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.left-description {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    flex-shrink: 0;
}

.right-lang {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .invite-bottom-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .right-lang {
        justify-content: flex-start;
        margin-left: 0;
    }
}


