/**
 * TechChang Premium Design System 2025
 * 영감: Dribbble, Awwwards, Apple
 *
 * 트렌드:
 * - Glassmorphism 2.0
 * - Bold Typography
 * - Vibrant Gradients
 * - Rich Colors
 * - Interactive Elements
 */

/* ============================================
   색상 시스템 - Vibrant & Rich
   ============================================ */

:root {
    /* 배경 - 미묘한 gradient mesh */
    --bg-primary: #ffffff;
    --bg-secondary: #fafbfc;
    --bg-gradient: linear-gradient(135deg, #f8f9ff 0%, #fff5f7 100%);

    /* 텍스트 */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --text-muted: #94a3b8;

    /* Accent Colors - 풍부함 */
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    --accent-teal: #14b8a6;
    --accent-green: #10b981;

    /* Gradient Accents */
    --gradient-blue: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-orange: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-green: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-purple: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-sunset: linear-gradient(135deg, #fa709a 0%, #fee140 100%);

    /* Game Colors */
    --game-baseball: #3b82f6;
    --game-2048: #f97316;
    --game-minesweeper: #ef4444;
    --game-tictactoe: #10b981;
    --game-wordchain: #8b5cf6;

    /* Shadows - 더 풍부함 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.15);

    /* Colored Shadows */
    --shadow-blue: 0 8px 32px rgba(59, 130, 246, 0.2);
    --shadow-purple: 0 8px 32px rgba(139, 92, 246, 0.2);
    --shadow-pink: 0 8px 32px rgba(236, 72, 153, 0.2);

    /* Border */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* Spacing */
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-24: 6rem;

    /* Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
}

/* ============================================
   Base Styles
   ============================================ */

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-gradient);
    background-attachment: fixed;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   Navigation - Glassmorphism
   ============================================ */

.premium-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.premium-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 104px;
}

.premium-nav-brand {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.premium-nav-links {
    display: flex;
    gap: var(--space-8);
    align-items: center;
}

.premium-nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s;
}

.premium-nav-link:hover {
    color: var(--text-primary);
}

/* ============================================
   Hero Section - Bold & Vibrant
   ============================================ */

.hero-premium {
    padding: var(--space-24) var(--space-8);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.hero-premium-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero-premium-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-premium-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-12);
    line-height: 1.6;
}

.hero-premium-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-16);
}

/* ============================================
   Buttons - Vibrant
   ============================================ */

.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.btn-premium-primary {
    background: var(--gradient-blue);
    color: white;
    box-shadow: var(--shadow-blue);
}

.btn-premium-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(59, 130, 246, 0.3);
}

.btn-premium-secondary {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-premium-secondary:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

/* ============================================
   Stats - Glassmorphism Cards
   ============================================ */

.stats-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-6);
    max-width: 900px;
    margin: 0 auto var(--space-16);
}

.stat-premium {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.stat-premium:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-premium-value {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-2);
}

.stat-premium-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   Game Cards - Rich Colors
   ============================================ */

.games-premium {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-16) var(--space-8);
}

.games-premium-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--space-12);
    text-align: center;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    max-width: 1200px;
    margin: 0 auto;
}

.game-card {
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: currentColor;
}

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

.game-card-icon {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: white;
    text-align: center;
}

.game-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.game-card-desc {
    color: var(--text-tertiary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Game Specific Colors */
.game-card-baseball {
    color: var(--game-baseball);
}

.game-card-baseball .game-card-icon {
    background: var(--game-baseball);
}

.game-card-2048 {
    color: var(--game-2048);
}

.game-card-2048 .game-card-icon {
    background: var(--game-2048);
}

.game-card-minesweeper {
    color: var(--game-minesweeper);
}

.game-card-minesweeper .game-card-icon {
    background: var(--game-minesweeper);
}

.game-card-tictactoe {
    color: var(--game-tictactoe);
}

.game-card-tictactoe .game-card-icon {
    background: var(--game-tictactoe);
}

.game-card-wordchain {
    color: var(--game-wordchain);
}

.game-card-wordchain .game-card-icon {
    background: var(--game-wordchain);
}

/* ============================================
   Post Cards - Bento Grid Premium
   ============================================ */

.posts-premium {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-16) var(--space-8);
}

.posts-premium-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--space-12);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-6);
}

.post-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

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

.post-card-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-4);
    width: fit-content;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-top: auto;
}

/* Category Colors */
.badge-hrd {
    background: rgba(59, 130, 246, 0.1);
    color: var(--game-baseball);
}

.badge-data {
    background: rgba(249, 115, 22, 0.1);
    color: var(--game-2048);
}

.badge-programming {
    background: rgba(16, 185, 129, 0.1);
    color: var(--game-tictactoe);
}

.badge-free {
    background: rgba(139, 92, 246, 0.1);
    color: var(--game-wordchain);
}

.badge-notice {
    background: rgba(239, 68, 68, 0.1);
    color: var(--game-minesweeper);
}

/* ============================================
   Category Pills - Colorful
   ============================================ */

.category-pills {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-12);
    justify-content: center;
}

.category-pill {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    background: white;
    color: var(--text-secondary);
    border: 2px solid var(--border-light);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
}

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

.category-pill.active {
    background: var(--gradient-blue);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-blue);
}

/* ============================================
   Container
   ============================================ */

.container-premium {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-8);
}

/* ============================================
   Pagination - Modern
   ============================================ */

.pagination-premium {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-16);
}

.pagination-premium a,
.pagination-premium span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 var(--space-4);
    font-weight: 600;
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-secondary);
    border: 2px solid var(--border-light);
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-premium a:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-2px);
}

.pagination-premium .active {
    background: var(--gradient-blue);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-blue);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-premium {
        padding: var(--space-16) var(--space-6);
    }

    .hero-premium-title {
        font-size: 2.5rem;
    }

    .games-grid,
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .premium-nav-links {
        display: none;
    }
}

/* ============================================
   Utilities
   ============================================ */

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