/* =========================================
   SHOW-TV Template - Modern Streaming Design
   Version: 2.0
   For MacCMS Pro
   ========================================= */

/* CSS Variables */
:root {
    /* Colors */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* Backgrounds */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --bg-overlay: rgba(15, 23, 42, 0.9);
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #1e293b;
    
    /* Borders */
    --border-color: rgba(148, 163, 184, 0.2);
    --border-hover: rgba(99, 102, 241, 0.5);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --gradient-overlay: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.8) 100%);
    
    /* Spacing */
    --container-max-width: 1280px;
    --header-height: 70px;
    --footer-height: auto;
    
    /* Border Radius */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    
    /* Transitions */
    --transition-default: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-out;
    --transition-slow: all 0.5s ease-out;
    
    /* Z-index */
    --z-header: 1000;
    --z-overlay: 1001;
    --z-modal: 1002;
    --z-tooltip: 1003;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-default);
}

a:hover {
    color: var(--primary-hover);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-default);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-default);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: var(--border-hover);
}

/* Video Card Grid */
.video-grid {
    display: grid;
    //grid-template-columns: repeat(auto-fit, 170px);
    gap: 1.5rem;
    margin: 2rem 0;
    justify-content: center;
}

.video-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-default);
    width: 100%;
    margin: 0 auto;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card);
}

.video-card .card-image {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-card .card-image a{ display: block; width: 100%;}

/* 이미지가 없을 때의 대체 스타일 */
.video-card .card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #6366f1 20%, #8b5cf6 80%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.video-card .card-image::after {
    content: '🎬';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

/* 이미지가 로드되지 않았을 때 대체 배경 표시 */
.video-card .card-image.no-image::before,
.video-card .card-image.no-image::after {
    opacity: 1;
}

.video-card .card-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: var(--transition-slow);
    display: block;
    position: relative;
    z-index: 3;
}

.video-card:hover .card-image img {
    transform: scale(1.05);
}

.video-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-default);
}

.video-card:hover .card-overlay {
    opacity: 1;
}

/* 비디오 카드 클릭 상태 (빠른 클릭 방지) */
.video-card.clicking {
    pointer-events: none;
    opacity: 0.8;
    transform: scale(0.98) !important;
    transition: all 0.2s ease;
    cursor: wait;
}

.video-card.clicking::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(99, 102, 241, 0.1);
    z-index: 10;
    animation: cardLoadingPulse 0.5s ease infinite alternate;
}

@keyframes cardLoadingPulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

.video-card .play-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-default);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.video-card .play-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.video-card .card-info {
    padding: 0.5rem 0.75rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.video-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.3;
    overflow: hidden;
    text-align: center;
    height: 1.3em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-card .card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-default);
}

.video-card .card-title a:hover {
    color: var(--primary-color);
}

.video-card .card-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-top: 0.3rem;
    padding: 0.15rem 0;
}

.video-card .date-badge {
    display: flex !important;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
    color: white !important;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10px;
    letter-spacing: 0.2px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
    visibility: visible !important;
    opacity: 1 !important;
    white-space: nowrap;
}

.video-card .date-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.video-card .date-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5);
}

.video-card .date-badge:hover::before {
    left: 100%;
}

.video-card .date-text {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.video-card .date-icon {
    flex-shrink: 0;
    color: rgba(99, 102, 241, 0.7);
    transition: all 0.2s ease;
}

.video-card .update-time:hover .date-icon {
    color: var(--primary-color);
    transform: scale(1.05);
}



/* NEW 뱃지 */
.video-card .new-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border-radius: 10px;
    padding: 0.2rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
    animation: newBadgePulse 2s infinite;
    z-index: 10;
}

.video-card .new-text {
    display: block;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes newBadgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.6);
    }
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 3rem 0 2rem 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-title .title-icon {
    font-size: 1.25rem;
}

.section-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.section-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.section-more:hover {
    color: white;
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.section-more:hover::before {
    left: 100%;
}

.section-more svg {
    transition: transform 0.3s ease;
}

.section-more:hover svg {
    transform: translateX(2px);
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    backdrop-filter: blur(10px);
}

.header-container {
    padding: 0 1rem;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.header-logo .logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.header-logo .logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav .nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav .nav-link {
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition-default);
    font-weight: 500;
}

.main-nav .nav-link:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-1px);
}

.main-nav .nav-item.active .nav-link {
    color: #ffffff !important;
    background: var(--gradient-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.main-nav .nav-item.active .nav-link::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6, #6366f1);
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.header-search .search-form {
    display: flex;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    transition: var(--transition-default);
}

.header-search .search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.header-search .search-input {
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    width: 180px;
    transition: var(--transition-default);
}

.header-search .search-input::placeholder {
    color: var(--text-muted);
}

.header-search .search-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 40px;
    padding: 0 !important;
    background: var(--gradient-primary);
    border: none;
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-default);
}

.header-search .search-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #7c3aed 100%);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding: 3rem 0 1rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition-default);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive Design */
/* 아이패드 전용 그리드 레이아웃 (6개씩 표시) */
@media (min-width: 769px) and (max-width: 1024px) {
    .video-grid {
        //grid-template-columns: repeat(4, 160px) !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1rem !important;
        justify-content: center !important;
        margin: 1.5rem 0 !important;
    }
    
    .video-card {
        width: 100% !important;
    }
    
    .video-card .card-image {
        width: 100% !important;
        height: auto !important;
    }
    
    .video-card .card-image a {
        display: block !important;
        width: 100% !important;
        position: relative !important;
        padding-top: 140% !important;
    }
    
    .video-card .card-image img {
        position: absolute;
        z-index: 10;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
    }
    
    .video-card .card-info {
        width: auto !important;
        padding: 0.4rem 0.6rem !important;
    }
    
    .video-card .card-title {
        font-size: 0.85rem !important;
    }
    
    .section-header {
        margin: 2.5rem 0 1.5rem 0 !important;
    }
    
    .section-more {
        font-size: 0.8rem !important;
        padding: 0.45rem 0.9rem !important;
    }
}

/* 큰 데스크톱 화면 (1025px 이상) */
@media (min-width: 1025px) {
    .video-grid {
        //grid-template-columns: repeat(auto-fit, 170px);
        grid-template-columns: repeat(6,1fr);
        gap: 1.5rem;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-wrapper {
        flex-wrap: wrap;
        height: auto;
        padding: 1rem 0;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    
    .main-nav .nav-list {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        justify-content: center;
    }
    
    .video-card {
        width: 100%;
        max-width: 100%;
    }
    
    .video-card .card-image {
        width: 100%;
        height: auto;
        aspect-ratio: 17/24;
    }
    
    .video-card .card-image img {
        width: 100%;
        height: auto;
        aspect-ratio: 17/24;
    }
    
    .video-card .card-info {
        width: 100%;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-more {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.8rem !important;
        align-self: flex-end;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.75rem;
        justify-content: center;
    }
    
    .video-card {
        width: 100%;
        max-width: 100%;
    }
    
    .video-card .card-image {
        width: 100%;
        height: auto;
        aspect-ratio: 17/24;
    }
    
    .video-card .card-image img {
        width: 100%;
        height: auto;
        aspect-ratio: 17/24;
    }
    
    .video-card .card-info {
        width: 100%;
    }
    
    .video-card .date-badge {
        font-size: 0.62rem !important;
        padding: 0.25rem 0.5rem !important;
        gap: 0.3rem !important;
    }
    
    .video-card .date-icon {
        width: 10px !important;
        height: 10px !important;
    }
    
    .header-search .search-input {
        width: 180px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-secondary) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.d-none { display: none; }
.d-block { display: block; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
} 



.mobile-search-section{ display: none;}






























