/* ========================================
   홈페이지 전용 스타일
   Neo-Brutalist & Modern Gradient Theme
   ======================================== */

/* Hero Section - 메인 배너 */
.hero {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.95) 0%, 
        rgba(118, 75, 162, 0.95) 100%);
    backdrop-filter: blur(10px);
    color: white;
    padding: 4rem 2rem;
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.1);
    animation: heroFloat 6s ease-in-out infinite;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 70%);
    animation: heroRotate 15s linear infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.8), 
        transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes heroRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(255, 255, 255, 0.3);
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    line-height: 1.8;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    font-weight: 300;
}

/* Hero 통계 바 */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    transition: transform 0.2s ease;
}

.hero-stat:hover {
    transform: translateY(-3px);
}

.hero-stat strong {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}

.hero-stat span {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 0.25rem;
}

.hero-cta {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 1.75rem;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
    transition: all 0.25s ease;
}

.hero-cta:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

/* Features Header */
.features-header {
    text-align: center;
    margin: 3rem 0 2rem;
}

.features-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.features-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid transparent;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(102, 126, 234, 0.1);
    position: relative;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.25),
        0 0 0 1px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.feature-link {
    display: block;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.feature-card:hover h3 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateX(8px);
}

.feature-card p {
    color: var(--text-tertiary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.go-to {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.feature-card:hover .go-to {
    gap: 1rem;
    color: var(--secondary-color);
}

.go-to::after {
    content: '→';
    transition: transform 0.3s ease;
}

.feature-card:hover .go-to::after {
    transform: translateX(4px);
}

/* 현재 시간 박스 (타임스탬프 페이지용) */
.current-time-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.current-time-box h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.current-time-box #currentTimeDisplay {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .features-header h2 {
        font-size: 2rem;
    }

    .feature-card h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .feature-link {
        padding: 1.5rem;
    }
}

/* 로딩 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }
.feature-card:nth-child(7) { animation-delay: 0.7s; }
.feature-card:nth-child(8) { animation-delay: 0.8s; }

/* 스크롤 애니메이션 */
@media (prefers-reduced-motion: no-preference) {
    .hero {
        animation: heroFloat 6s ease-in-out infinite;
    }
}

/* 다크모드: data-theme 방식으로 통합 (CSS 변수가 자동 처리) */
/* =============================================
   홈 페이지 계층형 메뉴 카드
   (index.html 인라인 스타일에서 이전 — CSS 변수 적용)
   ============================================= */

.menu-categories {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.category-section {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

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

.category-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    gap: 1.5rem;
}

.category-header:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
    filter: brightness(0.92);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-icon {
    font-size: 2rem;
}

.category-info h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.category-info p {
    margin: 0.25rem 0 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.category-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.category-section.collapsed .category-toggle {
    transform: rotate(-90deg);
}

.category-items {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.category-section.collapsed .category-items {
    max-height: 0;
    padding: 0 1.5rem;
}

.menu-item-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.menu-item-card:hover {
    border-color: var(--primary-color);
    background: var(--bg-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
}

.menu-item-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.menu-item-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.menu-item-description {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    line-height: 1.4;
}

.category-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    width:52px;
    text-align: center;
}

.empty-category {
    text-align: center;
    padding: 2rem;
    color: var(--text-tertiary);
    font-style: italic;
}

@media (max-width: 768px) {
    .category-items {
        grid-template-columns: 1fr;
    }

    .category-header {
        padding: 1rem 1.5rem;
    }

    .category-icon {
        font-size: 1.5rem;
    }

    .category-info h3 {
        font-size: 1.2rem;
    }
}

/* =============================================
   홈 페이지 - 최신 가이드 섹션
   ============================================= */

.home-guide-section {
    margin-top: 1rem;
}

.home-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.home-guide-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.4rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: all 0.2s;
}

.home-guide-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.home-guide-card .home-guide-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.home-guide-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.home-guide-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1;
}

.home-guide-more {
    text-align: center;
    margin-top: 1.5rem;
}

.home-guide-more a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.home-guide-more a:hover {
    text-decoration: underline;
}

/* =============================================
   홈 페이지 - 전체 도구 찾기 (검색창)
   ============================================= */

.tool-explorer {
    margin-top: 1rem;
    scroll-margin-top: 1rem;
}

.menu-search-box {
    max-width: 480px;
    margin: 0 auto 2rem;
}

.menu-search-box input {
    width: 100%;
    padding: 0.85rem 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.95rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.menu-search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

@media (max-width: 768px) {
    .hero-stats {
        gap: 1.5rem;
    }

    .hero-stat strong {
        font-size: 1.6rem;
    }
}
