/* [1] 웹 폰트 및 기본 변수 설정 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    --primary-gradient: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --accent: #6c5ce7;
    --accent-light: rgba(108, 92, 231, 0.08);
    --text-main: #2d3436;
    --text-sub: #636e72;
    --card-bg: #ffffff;
    --bg-color: #f8f9fa;
    --border-color: #f1f3f5;
}

/* [2] 기본 레이아웃 및 웹킷 최적화 */
* {
    -webkit-tap-highlight-color: transparent; /* 모바일 터치 시 파란 박스 제거 */
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', sans-serif;
    background-color: var(--bg-color);
    margin: 0; padding: 60px 0;
    color: var(--text-main);
    display: flex; justify-content: center;
    min-height: 100vh;
    /* 웹킷 텍스트 렌더링 최적화 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 640px; width: 90%;
    background: var(--card-bg);
    border-radius: 40px; padding: 50px 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.04);
    position: relative;
    /* 하드웨어 가속 유도 */
    transform: translateZ(0);
}

/* [3] 헤더 및 네비게이션 */
header { text-align: center; margin-bottom: 40px; }
.artist-name {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.8rem; font-weight: 800; margin: 0;
}
.tagline { color: var(--text-sub); margin-top: 10px; font-weight: 500; }

nav { display: flex; justify-content: space-around; margin-bottom: 40px; border-bottom: 1px solid #f1f1f1; }
.menu-item { padding: 15px 5px; color: var(--text-sub); font-weight: 700; cursor: pointer; transition: 0.3s; position: relative; }
.menu-item.active { color: var(--accent); }
.menu-item.active::after {
    content: ''; position: absolute; bottom: -1px; left: 0;
    width: 100%; height: 3px; background: var(--accent); border-radius: 10px;
}

/* [4] 유튜브 슬라이더 */
.slider-wrapper {
    display: flex; align-items: center; justify-content: center;
    gap: 15px; margin: 10px 0 30px; width: 100%;
}
.video-container {
    position: relative; width: 100%; aspect-ratio: 16 / 9;
    border-radius: 24px; overflow: hidden;
    box-shadow: 0 15px 35px rgba(108, 92, 231, 0.1); background: #000;
    /* 웹킷에서 둥근 모서리 안쪽으로 iframe이 튀어나오는 현상 방지 */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

.nav-btn {
    all: unset; cursor: pointer; width: 42px; height: 42px; background: #fff;
    border: 1px solid #eee; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.nav-btn:hover { background: var(--accent); border-color: var(--accent); transform: scale(1.1); }
.arrow-icon { display: inline-block; width: 8px; height: 8px; border-top: 2.5px solid #b2bec3; border-right: 2.5px solid #b2bec3; }
.prev .arrow-icon { transform: rotate(-135deg); margin-left: 4px; }
.next .arrow-icon { transform: rotate(45deg); margin-right: 2px; }

.input-field, .login-input {
    -webkit-appearance: none; /* iOS 기본 그림자/스타일 제거 */
    appearance: none;
    height: 45px; border: 1px solid #eee; border-radius: 12px;
    padding: 0 15px; font-family: inherit; font-size: 1rem; /* iOS 자동 줌 방지 (16px 이상) */
}
#content-field { height: auto; min-height: 45px; line-height: 1.5; padding: 10px 15px; resize: none; }

.submit-btn {
    height: 45px; padding: 0 20px; background: var(--accent); color: #fff;
    border: none; border-radius: 12px; font-weight: bold; cursor: pointer;
}

/* [6] 숫자 페이징 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 30px; }
.page-btn {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-color);
    background: #fff; color: var(--text-sub); font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: 0.3s;
}
.page-btn.active-page {
    background: var(--accent); color: #fff; border-color: var(--accent);
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3);
}

/* [7] 관리자 링크 및 모달 (통합 정리) */
.fixed-admin-link {
    position: fixed !important;
    top: 20px !important;
    right: 25px !important;
    z-index: 10000 !important;
    background: none !important;
    border: none !important;
    color: #bbb !important;
    font-size: 0.75rem !important;
    font-weight: 500;
    text-transform: uppercase !important;
    cursor: pointer;
    transition: 0.3s;
}
.fixed-admin-link:hover { color: var(--accent) !important; text-decoration: underline; }

@media (max-width: 768px) {
    .fixed-admin-link { top: 15px !important; right: 15px !important; font-size: 0.65rem !important; }
}

.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); 
    -webkit-backdrop-filter: blur(8px); /* 웹킷 블러 대응 */
    backdrop-filter: blur(8px); 
    z-index: 9999; justify-content: center; align-items: center;
}
.modal-content {
    background: white; padding: 40px; border-radius: 35px;
    width: 90%; max-width: 350px; text-align: center;
}

/* [8] 공통 카드 디자인 및 애니메이션 */
.info-card { background: #fdfdfd; padding: 25px; border-radius: 25px; border: 1px solid #f8f8f8; margin-bottom: 20px; }

.content-section { display: none; opacity: 0; }
.content-section.active { 
    display: block; 
    animation: fadeIn 0.5s ease forwards; 
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* 버튼 디자인 통일 */
.login-submit-btn, .login-close-btn {
    height: 55px; border-radius: 18px; font-weight: 700; cursor: pointer; transition: 0.2s; border: none; flex: 1;
}
.login-submit-btn { background-color: var(--accent); color: #fff; }
.login-close-btn { background-color: #f1f2f6; color: #57606f; }

/* 마우스 올렸을 때 효과를 CSS에서 처리 (JS 부하 감소) */
.home-latest-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 30px rgba(108, 92, 231, 0.3) !important;
}

/* 터치 디바이스(아이폰 등) 대응 */
@media (hover: none) {
    .home-latest-card:active {
        transform: scale(0.98);
        background: #1a1a2e;
    }
}
