:root {
    --primary: #1a365d;
    --secondary: #2c5282;
    --accent: #e53e3e;
    --bg: #f7fafc;
    --card-bg: #ffffff;
    --text: #2d3748;
    --text-light: #718096;
    --border: #e2e8f0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }

.header { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; padding: 2rem 1rem; text-align: center; }
.header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.header p { opacity: 0.9; margin-bottom: 1.5rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.search-box { position: relative; max-width: 600px; margin: 0 auto; }
.search-box input { width: 100%; padding: 0.8rem 1rem 0.8rem 3rem; border-radius: 50px; border: none; font-size: 1rem; outline: none; }
.search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); font-size: 1.2rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

.category-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 1.5rem 0; justify-content: center; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.category-nav button { padding: 0.5rem 1rem; border: 1px solid var(--border); background: white; border-radius: 20px; cursor: pointer; transition: all 0.3s; font-size: 0.9rem; }
.category-nav button:hover, .category-nav button.active { background: var(--primary); color: white; border-color: var(--primary); }

.content-section { margin-bottom: 3rem; }
.section-title { font-size: 1.5rem; color: var(--primary); padding-bottom: 0.5rem; border-bottom: 2px solid var(--accent); margin-bottom: 1.5rem; scroll-margin-top: 80px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }

.card { background: var(--card-bg); border-radius: 8px; padding: 1.5rem; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border: 1px solid var(--border); transition: transform 0.3s, box-shadow 0.3s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.card h3 { color: var(--primary); margin-bottom: 0.5rem; font-size: 1.1rem; }
.card .abbr { color: var(--accent); font-weight: bold; font-size: 0.9rem; margin-bottom: 0.5rem; display: block; }
.card .desc { color: var(--text-light); font-size: 0.9rem; margin-bottom: 1rem; }
.card .meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.card .code { background: #edf2f7; padding: 0.2rem 0.5rem; border-radius: 4px; color: var(--secondary); }
.card .market-cap { color: #38a169; font-weight: bold; }
.card a { color: var(--secondary); text-decoration: none; word-break: break-all; }
.card a:hover { text-decoration: underline; }

.footer { text-align: center; padding: 2rem; background: var(--primary); color: white; margin-top: 3rem; position: relative; }
.back-to-top { position: absolute; right: 2rem; bottom: 2rem; background: rgba(255,255,255,0.2); padding: 0.5rem 1rem; border-radius: 20px; color: white; text-decoration: none; }

@media (max-width: 768px) {
    .header h1 { font-size: 1.5rem; }
    .card-grid { grid-template-columns: 1fr; }
}
