/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6c63ff;
    --secondary: #ff6584;
    --dark: #1a1a2e;
    --darker: #16213e;
    --card-bg: #0f3460;
    --text: #e0e0e0;
    --text-muted: #a0a0a0;
    --border: rgba(255,255,255,0.1);
    --btc: #f7931a;
    --eth: #627eea;
    --defi: #00d395;
    --alt: #e84142;
    --crypto: #6c63ff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 
                 'Segoe UI', Roboto, sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== HEADER ===== */
.header {
    background: var(--darker);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 20px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5em;
    font-weight: 700;
}

.logo-icon { font-size: 1.2em; }

.logo-text {
    background: linear-gradient(135deg, #6c63ff, #ff6584);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-live {
    background: #ff4444;
    color: white;
    font-size: 0.4em;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Search */
.header-search {
    flex: 1;
    max-width: 500px;
}

.header-search form {
    display: flex;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.header-search input {
    flex: 1;
    padding: 10px 15px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.95em;
    outline: none;
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-search button {
    padding: 10px 15px;
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.header-search button:hover {
    background: #5a52d5;
}

/* Coin Filter Nav */
.coin-filter {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 0;
    scrollbar-width: none;
}

.coin-filter::-webkit-scrollbar { display: none; }

.coin-filter a {
    padding: 8px 16px;
    border-radius: 8px 8px 0 0;
    font-size: 0.9em;
    white-space: nowrap;
    color: var(--text-muted);
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.coin-filter a:hover,
.coin-filter a.active {
    color: white;
    background: rgba(108,99,255,0.2);
    border-bottom-color: var(--primary);
}

/* ===== MAIN ===== */
.main {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

/* Section Title */
.section-title {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #ff4444;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

/* ===== FEATURED SECTION ===== */
.featured-section {
    margin-bottom: 40px;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: auto auto;
    gap: 15px;
}

.featured-main {
    grid-row: 1 / 3;
    background: var(--darker);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.featured-main:hover {
    transform: translateY(-3px);
}

.featured-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.featured-content {
    padding: 20px;
}

.featured-content h2 {
    font-size: 1.3em;
    margin: 10px 0;
    line-height: 1.4;
}

.featured-content h2 a:hover {
    color: var(--primary);
}

.featured-content p {
    color: var(--text-muted);
    font-size: 0.95em;
    margin-bottom: 15px;
}

.featured-side {
    background: var(--darker);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    gap: 12px;
    padding: 12px;
    transition: transform 0.3s;
}

.featured-side:hover {
    transform: translateY(-2px);
}

.featured-side img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.side-content h3 {
    font-size: 0.95em;
    line-height: 1.4;
    margin: 5px 0 8px;
}

.side-content h3 a:hover {
    color: var(--primary);
}

/* ===== COIN BADGES ===== */
.coin-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}

.coin-badge.btc { background: rgba(247,147,26,0.2); color: var(--btc); }
.coin-badge.eth { background: rgba(98,126,234,0.2); color: var(--eth); }
.coin-badge.defi { background: rgba(0,211,149,0.2); color: var(--defi); }
.coin-badge.alt { background: rgba(232,65,66,0.2); color: var(--alt); }
.coin-badge.crypto { background: rgba(108,99,255,0.2); color: var(--crypto); }

/* ===== ARTICLE META ===== */
.article-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== NEWS GRID ===== */
.news-section { margin-top: 20px; }

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.news-card {
    background: var(--darker);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(108,99,255,0.2);
}

.card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .card-image img {
    transform: scale(1.05);
}

.card-image .coin-badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

.card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-content h3 {
    font-size: 1em;
    line-height: 1.4;
    flex: 1;
}

.card-content h3 a:hover {
    color: var(--primary);
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.85em;
    line-height: 1.5;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 16px;
    background: var(--darker);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    transition: all 0.3s;
    font-size: 0.9em;
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ===== SEARCH INFO ===== */
.search-info {
    background: rgba(108,99,255,0.1);
    border: 1px solid rgba(108,99,255,0.3);
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.search-info a {
    color: var(--primary);
    margin-left: 10px;
}

/* ===== NO RESULTS ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    margin-top: 15px;
    transition: background 0.3s;
}

.btn:hover { background: #5a52d5; }

/* ===== FOOTER ===== */
.footer {
    background: var(--darker);
    border-top: 1px solid var(--border);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-brand h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: white;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9em;
    line-height: 1.6;
}

.footer-links h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1em;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links ul li a {
    color: var(--text-muted);
    font-size: 0.9em;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: var(--primary);
}

.footer-info h4 {
    color: white;
    margin-bottom: 10px;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-bottom: 8px;
}

.copyright {
    margin-top: 15px;
    font-size: 0.85em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: stretch;
    }

    .header-search {
        max-width: 100%;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .featured-main {
        grid-row: auto;
    }

    .featured-side {
        flex-direction: column;
    }

    .featured-side img {
        width: 100%;
        height: 150px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .logo a {
        font-size: 1.2em;
    }
}