/* =============================================
   미니게임천국 - 공통 스타일
   모바일 퍼스트: PC에서도 모바일 뷰로 표시
   ============================================= */

:root {
    --mg-primary: #6C5CE7;
    --mg-bg: #0f0f1a;
    --mg-card: #1a1a2e;
    --mg-text: #f0f0f0;
    --mg-text-sub: #9ca3af;
    --mg-border: #2d2d44;
    --mg-accent: #00d4ff;
    --mg-max-width: 480px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    background: #000;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--mg-bg);
    color: var(--mg-text);
    min-height: 100dvh;
    max-width: var(--mg-max-width);
    margin: 0 auto;
    position: relative;
    box-shadow: 0 0 40px rgba(108, 92, 231, 0.1);
}

/* Header */
.mg-header {
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--mg-border);
    padding: 0 20px;
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.mg-header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mg-logo {
    color: var(--mg-text);
    text-decoration: none;
    font-weight: 800;
    font-size: 18px;
}
.mg-home-link {
    color: var(--mg-text-sub);
    text-decoration: none;
    font-size: 13px;
}
.mg-home-link:hover { color: var(--mg-text); }

/* Main */
.mg-main {
    padding: 0 20px 40px;
}

/* Hero */
.mg-hero {
    text-align: center;
    padding: 48px 0 32px;
}
.mg-hero h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}
.mg-hero p {
    color: var(--mg-text-sub);
    font-size: 14px;
}

/* Category Tabs */
.mg-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-top: 20px;
    padding-bottom: 16px;
    margin-bottom: 4px;
}
.mg-tabs::-webkit-scrollbar { display: none; }
.mg-tab {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--mg-border);
    background: transparent;
    color: var(--mg-text-sub);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.mg-tab:hover {
    border-color: var(--mg-accent);
    color: var(--mg-text);
}
.mg-tab.active {
    background: var(--mg-accent);
    border-color: var(--mg-accent);
    color: var(--mg-bg);
}

/* Game Cards */
.mg-games {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mg-game-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--mg-card);
    border: 1px solid var(--mg-border);
    border-radius: 16px;
    padding: 16px;
    text-decoration: none;
    color: var(--mg-text);
    transition: transform 0.15s, border-color 0.15s;
}
.mg-game-card:hover:not(.mg-coming-soon) {
    transform: translateY(-2px);
    border-color: var(--mg-accent);
}
.mg-coming-soon {
    opacity: 0.4;
    cursor: default;
}
.mg-game-icon {
    font-size: 36px;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 92, 231, 0.15);
    border-radius: 14px;
    flex-shrink: 0;
}
.mg-game-info {
    flex: 1;
    min-width: 0;
}
.mg-game-info h2 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 3px;
}
.mg-game-info p {
    font-size: 12px;
    color: var(--mg-text-sub);
    line-height: 1.4;
}
.mg-game-meta {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}
.mg-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--mg-text-sub);
}
.mg-badge-easy { color: #34d399; background: rgba(52, 211, 153, 0.12); }
.mg-badge-medium { color: #fbbf24; background: rgba(251, 191, 36, 0.12); }
.mg-badge-hard { color: #f87171; background: rgba(248, 113, 113, 0.12); }
.mg-badge-hot { color: #fb923c; background: rgba(251, 146, 60, 0.15); font-weight: 600; }
.mg-game-play {
    font-size: 13px;
    font-weight: 700;
    color: var(--mg-accent);
    flex-shrink: 0;
    padding: 7px 14px;
    border: 1px solid var(--mg-accent);
    border-radius: 10px;
    transition: background 0.15s;
}
.mg-game-card:hover .mg-game-play {
    background: var(--mg-accent);
    color: var(--mg-bg);
}

/* In-feed Ad Card */
.mg-ad-card {
    background: var(--mg-card);
    border: 1px solid var(--mg-border);
    border-radius: 16px;
    padding: 12px 16px;
    overflow: hidden;
    min-height: 100px;
}
