/* ============================================
   CryptoPro — Universal Crypto Template
   Dark theme, mobile-first, SEO-optimized
   ============================================ */

:root {
    --primary: #00d4aa;
    --accent: #7b61ff;
    --bg-dark: #0a0a1a;
    --bg-card: #12122a;
    --bg-card-hover: #1a1a3a;
    --text: #e0e0e0;
    --text-muted: #8892b0;
    --border: #1e1e3a;
    --radius: 12px;
    --radius-sm: 8px;
    --max-width: 1200px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: #33e6c0; }
img { max-width: 100%; height: auto; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 2rem; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.8rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: #0a0a1a; }
.btn-primary:hover { background: #00eabb; color: #0a0a1a; transform: translateY(-1px); }
.btn-lg { padding: 0.85rem 2.2rem; font-size: 1.05rem; }
.btn-outline { border: 1px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #0a0a1a; }

/* Badge */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--accent);
    color: #fff;
}

/* Header */
.header {
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.logo {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary);
    letter-spacing: -0.02em;
}
.logo:hover { color: var(--primary); }
.nav-desktop { display: flex; gap: 1.5rem; }
.nav-desktop a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.nav-desktop a:hover { color: var(--text); }
.prices-ticker { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--text-muted); }
.ticker-item { white-space: nowrap; }

.lang-switch { display: flex; gap: 4px; margin-left: 0.5rem; }
.lang-btn { padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); border: 1px solid var(--border); }
.lang-btn.active { background: var(--primary); color: var(--bg-dark); border-color: var(--primary); }
.lang-btn:hover { color: var(--text); border-color: var(--text-muted); }

.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.2s; }
.mobile-nav { display: none; background: var(--bg-card); border-bottom: 1px solid var(--border); }
.mobile-nav a { display: block; padding: 0.75rem 1.25rem; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.mobile-nav a:hover { color: var(--text); background: var(--bg-card-hover); }
.mobile-nav.open { display: block; }

@media (max-width: 768px) {
    .nav-desktop, .prices-ticker { display: none; }
    .mobile-toggle { display: block; }
}

/* Hero */
.hero {
    text-align: center;
    padding: 5rem 1rem 4rem;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #0f0f2e 50%, var(--bg-dark) 100%);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(0, 212, 170, 0.05) 0%, transparent 60%);
    animation: heroGlow 8s ease-in-out infinite;
}
@keyframes heroGlow { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.hero-title { font-size: 2.8rem; font-weight: 800; margin-bottom: 1rem; position: relative; line-height: 1.15; }
.hero-subtitle { font-size: 1.15rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 2rem; position: relative; }
@media (max-width: 600px) { .hero-title { font-size: 1.8rem; } .hero { padding: 3rem 1rem; } }

/* Ticker Section */
.ticker-section { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 0.75rem 0; }
.ticker-bar { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }
.ticker-coin { font-size: 0.85rem; white-space: nowrap; }
.coin-name { font-weight: 700; color: var(--text); margin-right: 0.3rem; }
.change { font-weight: 600; margin-left: 0.3rem; }
.change.up { color: #00d4aa; }
.change.down { color: #ff4757; }

/* How It Works */
.how-it-works { padding: 4rem 0; }
.section-title { text-align: center; font-size: 1.8rem; margin-bottom: 2.5rem; font-weight: 700; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: transform 0.2s, border-color 0.2s;
}
.step-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.step-number {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--bg-dark);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.85rem;
    line-height: 28px;
}
.step-icon { width: 48px; height: 48px; color: var(--primary); margin: 1rem auto 0.75rem; }
.step-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.step-card p { color: var(--text-muted); font-size: 0.9rem; }

/* Trust Signals */
.trust-section { padding: 3rem 0; background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2rem; text-align: center; }
.trust-value { font-size: 2rem; font-weight: 800; color: var(--primary); }
.trust-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* Articles Grid */
.latest-articles { padding: 4rem 0; }
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.articles-grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
    color: var(--text);
    display: block;
}
.article-card:hover { transform: translateY(-4px); border-color: var(--primary); color: var(--text); }
.article-card-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-card-hover);
}
.article-card-img-placeholder {
    background: linear-gradient(135deg, var(--bg-card-hover) 0%, #1a1a40 100%);
}
.article-card-body { padding: 1.25rem; }
.article-card-body h3 { font-size: 1rem; margin-bottom: 0.5rem; line-height: 1.35; }
.article-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }

/* Article Full */
.page-content { padding: 2rem 0 4rem; }
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 0.3rem; }

.article-full {}
.article-header { margin-bottom: 2rem; }
.article-header h1 { font-size: 2rem; line-height: 1.2; margin-bottom: 1rem; }
.author-info { display: flex; align-items: center; gap: 0.75rem; }
.author-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.article-featured-img { margin-bottom: 2rem; border-radius: var(--radius); overflow: hidden; }
.article-featured-img img { width: 100%; display: block; }

.article-content { line-height: 1.8; font-size: 1.05rem; }
.article-content h1, .article-content h2, .article-content h3 { margin: 1.5rem 0 0.75rem; }
.article-content h2 { font-size: 1.5rem; }
.article-content h3 { font-size: 1.2rem; }
.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol { margin: 0.75rem 0 1rem 1.5rem; }
.article-content li { margin-bottom: 0.35rem; }
.article-content img { border-radius: var(--radius-sm); margin: 1rem 0; }
.article-content a { color: var(--primary); }

/* Expert Box */
.expert-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    margin: 2rem 0;
    padding: 1.5rem;
}
.expert-box-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.expert-box-body { color: var(--text-muted); line-height: 1.7; }

/* FAQ */
.faq-section { margin: 2.5rem 0; }
.faq-section h2 { margin-bottom: 1.5rem; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.25rem; margin-bottom: 0.75rem; }
.faq-question { font-size: 1rem; margin-bottom: 0.5rem; color: var(--primary); }
.faq-answer { color: var(--text-muted); font-size: 0.95rem; }

/* Related Articles */
.related-articles { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.related-articles h2 { margin-bottom: 1.5rem; }

/* Pagination */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.page-link {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); color: var(--bg-dark); border-color: var(--primary); font-weight: 700; }
.page-link.disabled { opacity: 0.4; pointer-events: none; }

/* Calculator */
.calc-container { max-width: 600px; margin: 2rem auto; }
.calc-row { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.calc-input-group { flex: 1; min-width: 180px; }
.calc-input-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.calc-field { display: flex; gap: 0.5rem; }
.calc-input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    color: var(--text);
    font-size: 1.1rem;
    outline: none;
}
.calc-input:focus { border-color: var(--primary); }
.calc-result { font-weight: 700; color: var(--primary); }
.calc-select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.5rem;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 80px;
    outline: none;
}
.calc-select:focus { border-color: var(--primary); }
.calc-swap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: var(--primary);
    font-size: 1.4rem;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    margin-bottom: 2px;
}
.calc-swap:hover { background: var(--primary); color: var(--bg-dark); }
.calc-rate { text-align: center; margin-top: 1.25rem; font-size: 0.9rem; color: var(--text-muted); }
.calc-disclaimer { text-align: center; margin-top: 1rem; font-size: 0.8rem; color: var(--text-muted); opacity: 0.7; }

/* Prices Table */
.prices-table-wrap { overflow-x: auto; }
.prices-table { width: 100%; border-collapse: collapse; }
.prices-table th, .prices-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.prices-table th { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.prices-table tbody tr:hover { background: var(--bg-card-hover); }

/* Footer */
.footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { font-size: 0.95rem; margin-bottom: 0.75rem; color: var(--text); }
.footer-col a { display: block; color: var(--text-muted); font-size: 0.85rem; padding: 0.2rem 0; }
.footer-col a:hover { color: var(--primary); }
.footer-col p { font-size: 0.85rem; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.25rem; text-align: center; font-size: 0.8rem; color: var(--text-muted); }
