/* (기본 설정 유지) */
:root {
    --white: #ffffff;
    --light-a: #f8f8f8;
    --light-b: #e6e6e6;
    --black: #000000;
    --dark-a: #000000; 
    --dark-b: #505050;
    --symbol: #203880;
    --symbol-l: #155AE5;
    --symbol-d: #23D49C;
    
    /* 알림 색상 정의 */
    --noti-success: #4CAF50; /* 연두색 계열 */
    --noti-fail: #F44336;    /* 빨간색 */
    --noti-warn: #FFEB3B;    /* 노란색 */
    --noti-info: #9E9E9E;    /* 회백색 */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Sans KR', sans-serif; overflow-x: hidden; }
body.dark-mode { background-color: var(--dark-a); color: var(--white); }
a { text-decoration: none; color: inherit; }

/* Top Bar & Nav */
.top-bar {
    height: 40px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 5%; font-size: 0.8rem; border-bottom: 1px solid var(--dark-b);
    position: relative; z-index: 100;
    background-color: var(--dark-a);
}

.main-nav {
    height: 80px; display: flex; justify-content: space-between; align-items: center;
    padding: 0 5%; position: relative; z-index: 90;
    transition: opacity 0.5s;
    background-color: var(--dark-a); /* 배경색 명시 */
}
/* intro 페이지가 아닌 곳에서는 항상 보이도록 */
.main-nav.visible { opacity: 1; }

.nav-right { display: flex; align-items: center; gap: 30px; }
.nav-left .brand-name { 
    font-size: 1.5rem; font-weight: 900; letter-spacing: -0.5px; 
    transition: opacity 0.3s;
}
.nav-left .brand-name.show { opacity: 1; }

/* 버튼 스타일 */
.btn-watch {
    padding: 8px 16px; 
    border-radius: 20px; 
    font-weight: bold; 
    cursor: pointer;
    display: flex; align-items: center; gap: 8px; 
    transition: all 0.3s;
    background-color: var(--symbol-d); 
    color: var(--black);
    border: 1px solid var(--symbol-d);
}
.btn-watch:hover {
    background-color: transparent;
    color: var(--symbol-d);
}

/* --- Notification System --- */
:root {
    /* (기존 변수 유지) */
    --white: #ffffff;
    --black: #000000;
    
    /* 심볼 색상 (아이콘 색상) */
    --noti-symbol-success: #4CAF50;
    --noti-symbol-fail: #F44336;
    --noti-symbol-warn: #FFEB3B;
    --noti-symbol-info: #9E9E9E;

    /* 배경 색상 (심볼의 어두운 버전) */
    --noti-bg-success: #1E3320; /* 짙은 녹색 */
    --noti-bg-fail: #3E1B1B;    /* 짙은 적색 */
    --noti-bg-warn: #3E3815;    /* 짙은 황색 */
    --noti-bg-info: #2C2C2C;    /* 짙은 회색 */
}

#notification-container {
    position: fixed;
    top: 65px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}

.custom-noti {
    /* 공통 스타일 */
    border-radius: 30px; /* 둥근 캡슐 형태 */
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 40px; /* 기존 50px -> 40px로 축소 (컴팩트) */
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    width: 40px; /* 초기 너비: 높이와 동일한 정원 */
    
    /* 테두리 제거됨 */
}

/* 타입별 배경색 적용 */
.custom-noti.success { background-color: var(--noti-bg-success); }
.custom-noti.fail    { background-color: var(--noti-bg-fail); }
.custom-noti.warn    { background-color: var(--noti-bg-warn); }
.custom-noti.info    { background-color: var(--noti-bg-info); }

/* 알림 아이콘 영역 */
.noti-icon {
    min-width: 40px; /* 박스 높이와 동일하게 */
    height: 100%;
    display: flex; justify-content: center; align-items: center;
    font-size: 1rem; /* 아이콘 크기 약간 축소 */
    padding-left: 5px; /* 시각적 보정 */
}

/* 아이콘 색상 (심볼 색상) */
.custom-noti.success .noti-icon { color: var(--noti-symbol-success); }
.custom-noti.fail .noti-icon    { color: var(--noti-symbol-fail); }
.custom-noti.warn .noti-icon    { color: var(--noti-symbol-warn); }
.custom-noti.info .noti-icon    { color: var(--noti-symbol-info); }

/* 알림 텍스트 영역 */
.noti-text {
    /* flex-grow, text-align 제거하여 좌측 정렬(기본값)로 복구 */
    white-space: nowrap;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    
    /* 우측 여백 축소 (20px -> 15px) */
    padding-right: 5px; 
    
    opacity: 0;
    transform: translateX(10px); /* 텍스트가 오른쪽에서 스르륵 나타나는 효과 */
    transition: opacity 0.3s, transform 0.3s;
}

/* --- 애니메이션 클래스 --- */

/* 1단계: 위에서 내려오며 등장 */
.custom-noti.slide-in {
    animation: notiSlideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* 2단계: 너비 확장 */
.custom-noti.expand {
    transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* [수정됨] 3단계: 텍스트 보이기 */
.custom-noti.show-text .noti-text {
    opacity: 1;
    transform: translateX(0); /* 제자리로 이동 */
}

/* 4단계: 사라지기 (1초 페이드 아웃 - 유지) */
.custom-noti.fade-out {
    opacity: 0;
    transition: opacity 1s ease-out;
}

@keyframes notiSlideDown {
    0% { transform: translateY(-30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}


/* --- Intro Layout (기존 코드 유지) --- */
.intro-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 1000;
    background-color: var(--dark-a); /* 배경색 명시 */
}
.intro-title, .intro-subtitle {
    opacity: 0; transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s;
}
.intro-title { font-size: 3rem; font-weight: 900; }
.intro-subtitle { font-size: 1.2rem; color: var(--light-b); margin-top: 20px; }

.intro-container {
    padding: 20px 5%; display: flex; gap: 40px;
    opacity: 0; transition: opacity 0.5s; height: calc(100vh - 120px); 
}
.intro-container.visible { opacity: 1; }

/* Video Section */
.video-section { flex: 6; display: flex; flex-direction: column; gap: 15px; }
.video-wrapper {
    position: relative; width: 100%; aspect-ratio: 16 / 9;
    background-color: #1a1a1a; border-radius: 10px; overflow: hidden;
}
.video-wrapper iframe { width: 100%; height: 100%; }

.subtitle-target {
    min-height: 45px; display: flex; align-items: center;
    font-size: 2.1rem; font-weight: bold; color: var(--white);
    opacity: 0; transition: opacity 0.3s; margin-top: 10px;
}

.intro-description {
    font-size: 1.6rem; 
    color: var(--light-b);
    opacity: 0;
    transition: opacity 1s;
    margin-top: -5px;
    line-height: 1.4; 
}

.text-highlight {
    color: inherit;
    font-weight: normal;
    transition: color 0.5s, font-weight 0.5s;
}
.text-highlight.active {
    color: var(--symbol-d);
    font-weight: 900;
}


/* List Section & Buttons */
.list-section {
    flex: 4; display: flex; flex-direction: column; gap: 15px;
    overflow-y: auto; padding-bottom: 20px;
}
.list-item {
    display: flex; gap: 15px; opacity: 0; transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
    background: rgba(255,255,255,0.05); padding: 10px; border-radius: 8px;
    position: relative; padding-right: 140px; 
}
.list-item.show { opacity: 1; transform: translateY(0); }

.list-img { flex: 3; aspect-ratio: 16 / 9; background-color: var(--dark-b); border-radius: 5px; overflow: hidden; }
.list-img img { width: 100%; height: 100%; object-fit: cover; }

.list-text { flex: 7; display: flex; flex-direction: column; justify-content: flex-start; padding-top: 5px; }
.list-text h4 { font-size: 1rem; margin-bottom: 5px; color: var(--white); }
.list-text p { font-size: 0.8rem; color: #aaa; }

.item-buttons {
    position: absolute; bottom: 10px; right: 10px; height: 30%;
    display: flex; gap: 8px; align-items: flex-end;
}
.item-btn {
    height: 100%; aspect-ratio: 1 / 1; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; font-size: 0.8rem; padding: 0;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-fill { background-color: var(--symbol-d); color: var(--black); border: 1px solid var(--symbol-d); }
.btn-fill:hover { background-color: transparent; color: var(--symbol-d); }
.btn-outline { background-color: transparent; border: 1px solid #888888; color: #888888; }
.btn-outline:hover { background-color: #888888; color: var(--white); border-color: #888888; }