/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Sans', 'ヒラギノ角ゴシック', 'Yu Gothic', 'メイリオ', sans-serif;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* 인트로 화면 */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease-out;
}

.intro-content {
    text-align: center;
    color: white;
}

.intro-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.intro-text h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.intro-text p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 메인 화면 */
.main-screen {
    min-height: 100vh;
    padding: 20px;
    transition: transform 0.3s ease-in-out;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.main-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* 태그 스타일 */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.tag {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    user-select: none;
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tag.active {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    transform: scale(1.05);
}

/* 비디오 리스트 */
.video-list-container {
    max-width: 100%;
}

.video-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-item {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    height: 30pt; /* 요구사항: 리스트 높이 30pt */
    overflow: hidden;
}

.video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.video-thumbnail {
    width: 80px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
    flex-shrink: 0;
}

.video-title {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
}

/* 로드 더 버튼 */
.load-more {
    text-align: center;
    margin-top: 20px;
}

.top-button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.top-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* 상세 화면 */
.detail-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 2000;
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}

.detail-screen.slide-in {
    transform: translateX(0);
}

.detail-screen.slide-out {
    transform: translateX(100%);
}

.detail-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.back-button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.detail-title {
    font-size: 1.2rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-container {
    width: 100%;
    padding: 20px;
}

.video-container iframe {
    width: 100%;
    height: 200px;
    border-radius: 10px;
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.video-info p {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 로딩 애니메이션 */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* 반응형 디자인 */
@media (max-width: 480px) {
    .main-title {
        font-size: 1.5rem;
    }
    
    .tag {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .video-item {
        height: 50px;
        padding: 8px;
    }
    
    .video-thumbnail {
        width: 70px;
        height: 40px;
        margin-right: 10px;
    }
    
    .video-title {
        font-size: 0.8rem;
    }
    
    .intro-text h1 {
        font-size: 2rem;
    }
    
    .intro-text p {
        font-size: 1rem;
    }
    
    .intro-image {
        width: 150px;
        height: 150px;
    }
}
