/* Artists All Fit Page Styles */
/* 데스크탑에서 완전한 Full Screen 반응형 구현 */

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden !important; /* 데스크탑에서는 스크롤 완전 차단 */
    -webkit-overflow-scrolling: touch !important;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    min-height: 100vh;
}

/* ===== HEADER STYLES ===== */
.header-area {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px; /* 고정 높이 설정 */
    background: transparent !important;
    transition: all 0.3s ease;
}

.header-area:hover {
    background: transparent !important;
}

.navbar-nav .nav-link {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 1);
}

#current-time {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    font-weight: 500;
    font-size: 14px;
    margin: 0 20px;
}

/* ===== MAIN CONTENT AREA ===== */
.elements-area {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: 70px; /* 헤더 높이만큼 위쪽 패딩 */
}

.dynamic-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
    max-width: 95%;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    height: calc(100vh - 70px); /* 헤더 제외한 전체 높이 */
}

/* ===== PAGE TITLE ===== */
.page-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vh, 3rem);
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: clamp(15px, 3vh, 30px);
    color: #ffffff;
    text-transform: uppercase;
    position: relative;
    flex-shrink: 0;
    height: clamp(60px, 12vh, 120px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
}

/* ===== ARTIST GRID - 완전한 Full Screen 자동 조정 ===== */
.artist-grid {
    display: grid;
    width: 100%;
    height: 100%;
    flex: 1;
    overflow: hidden;
    
    /* 화면 크기에 따른 동적 그리드 */
    grid-template-columns: repeat(auto-fit, minmax(clamp(180px, 15vw, 250px), 1fr));
    grid-template-rows: repeat(auto-fit, minmax(clamp(240px, 20vh, 320px), 1fr));
    
    /* 간격 조정 - 화면 크기에 따라 */
    gap: clamp(10px, 2vh, 25px) clamp(8px, 1.5vw, 20px);
    
    /* 그리드 아이템들이 남은 공간을 완전히 채우도록 */
    grid-auto-rows: 1fr;
    align-items: stretch;
    justify-items: stretch;
    
    /* 이름표를 위한 여백 */
    padding-top: clamp(25px, 5vh, 50px);
    margin-top: 0;
}

/* 화면 비율에 따른 최적화된 그리드 */
@media (min-width: 1920px) {
    .artist-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 25px 20px;
    }
}

@media (min-width: 1200px) and (max-width: 1919px) {
    .artist-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px 18px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .artist-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 18px 15px;
    }
}

/* ===== ARTIST ITEMS ===== */
.artist-item {
    position: relative;
    aspect-ratio: 3/4;
    overflow: visible;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    width: 100%;
    height: 100%;
    min-height: 0; /* flexbox에서 최소 높이 제거 */
}

.artist-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    will-change: transform;
}

.artist-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    filter: grayscale(0%);
    transition: filter 0.4s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.artist-item:hover img {
    filter: grayscale(0%);
}

/* ===== ARTIST INFO TAGS ===== */
.artist-info {
    position: absolute;
    top: 0;
    transform: translateY(-100%);
    left: 15px;
    background: #ffffff;
    color: #1a1a1a;
    padding: clamp(0.2vh, 0.4vh, 0.6vh) clamp(0.4vh, 0.8vh, 1.2vh);
    border-radius: 4px;
    font-size: clamp(0.6rem, 1.2vh, 0.9rem);
    font-weight: 500;
    border: 2px solid #333333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    z-index: 100;
    min-width: clamp(50px, 8vh, 80px);
    text-align: center;
    white-space: nowrap;
}

.artist-item:hover .artist-info {
    transform: translateY(calc(-100% - 2px));
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.artist-tag-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.artist-name-ko {
    font-size: 1em;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.3px;
    margin-bottom: 1px;
}

.artist-name-en {
    font-size: 0.7em;
    font-weight: 500;
    color: #666666;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ===== OVERLAY EFFECTS ===== */
.artist-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    height: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 0 8px 8px;
}

.artist-item:hover .artist-overlay {
    opacity: 1;
}

/* ===== LOADING AND ERROR STATES ===== */
.loading-container, .error-container {
    grid-column: 1/-1;
    text-align: center;
    padding: 40px;
    color: #ffffff;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.error-container h3 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.retry-button {
    margin-top: 15px;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-button:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
/* 태블릿 가로 모드 */
@media (min-width: 769px) and (max-width: 991px) {
    .dynamic-container {
        max-width: 98%;
        padding: 15px;
    }
    
    .artist-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px 12px;
    }
}

/* 태블릿 세로 및 모바일에서는 스크롤 허용 */
@media (max-width: 768px) {
    html, body {
        overflow: auto !important;
        height: auto;
    }
    
    .elements-area {
        height: auto;
        overflow: visible;
        padding-top: 70px;
    }
    
    .dynamic-container {
        height: auto;
        overflow: visible;
    }
    
    .artist-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        height: auto;
        overflow: visible;
        padding-top: 30px;
    }
    
    .page-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
        height: auto;
    }
    
    .artist-info {
        font-size: 0.6rem;
        left: 10px;
        min-width: 50px;
        padding: 3px 6px;
    }

    .artist-name-ko {
        font-size: 0.8em;
    }

    .artist-name-en {
        font-size: 0.6em;
    }

    .artist-item {
        max-height: none;
    }
}

@media (max-width: 480px) {
    .artist-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
} 