/* =============================================
   style.css - findmyip.kr 공통 스타일
   색상 변수는 themes.css 에서 관리합니다.
   ============================================= */

/* ===== CSS 변수 (색상 외 공통값) ===== */
:root {
    --header-height: 60px;
    --radius:        8px;
    --font-mono:     'Space Mono', monospace;
    --font-main:     'Noto Sans KR', sans-serif;
}

/* ===== 리셋 & 기본 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 배경 그리드 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* ===== 헤더 / 네비게이션 ===== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: rgba(6, 9, 15, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(0,212,255,0.4); }
    50%       { opacity: 0.7; transform: scale(1.2); box-shadow: 0 0 0 6px rgba(0,212,255,0); }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius);
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    background: var(--accent-glow);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-strong);
    color: var(--accent);
    padding: 6px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 18px;
}

/* ===== 히어로 공통 ===== */
.hero {
    position: relative;
    z-index: 1;
    padding: 60px 24px 48px;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,212,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-glow);
    border: 1px solid var(--border-strong);
    color: var(--accent);
    font-size: 11px;
    font-family: var(--font-mono);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(32px, 6vw, 56px);
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 12px;
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero-sub {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== 공통 카드 ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.3s, background 0.3s;
}

.card:hover {
    border-color: var(--border-strong);
    background: var(--bg-card-hover);
}

.card-title {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 12px;
    background: var(--accent);
    border-radius: 2px;
}

/* ===== 공통 버튼 ===== */
.btn-primary {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: var(--radius);
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: #00f0ff;
    transform: translateY(-1px);
}

/* ===== 공통 인풋 ===== */
.search-input {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus  { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

/* ===== 뉴스/게시판 섹션 ===== */
.news-section {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.news-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-header-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.news-header h2 {
    font-size: 12px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.news-list { list-style: none; }

.news-list li { border-bottom: 1px solid var(--border); }
.news-list li:last-child { border-bottom: none; }

.news-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    transition: all 0.2s;
}

.news-list li a::before {
    content: '›';
    color: var(--text-muted);
    font-size: 16px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.news-list li a:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    padding-left: 24px;
}

.news-list li a:hover::before { color: var(--accent); }

/* ===== 푸터 ===== */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    font-family: var(--font-mono);
}

footer a { color: var(--accent-dim); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ===== 유틸리티 ===== */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}
.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.2s; }

@keyframes fadeIn { to { opacity: 1; } }

/* ===== 반응형 ===== */
@media (max-width: 640px) {
    .nav-links  { display: none; }
    .nav-toggle { display: block; }
    .news-section { grid-template-columns: 1fr; }
    .hero { padding: 40px 20px 32px; }
}