@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* ===========================
   CSS Variables & Reset
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0b0d;
    --bg-secondary: #12151a;
    --bg-tertiary: #1a1f26;
    --bg-card: #1e232b;
    --bg-hover: #252b35;
    --accent-danger: #ff3366;
    --accent-warning: #ffaa00;
    --accent-success: #00ff88;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-dim: #475569;
    --border-color: #2a3441;
    --gradient-risk: linear-gradient(135deg, #ff3366, #ff6b6b);
    --gradient-safe: linear-gradient(135deg, #00ff88, #00d68f);
    --gradient-neutral: linear-gradient(135deg, #ffaa00, #ffd93d);
    --header-height: 60px;
    --nav-height: 60px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

body {
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom));
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 51, 102, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 136, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 170, 0, 0.08) 0%, transparent 50%);
    animation: meshMove 30s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes meshMove {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-20px, -20px) scale(1.1); }
    66% { transform: translate(20px, -10px) scale(0.95); }
}

/* ===========================
   Header
   =========================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-safe);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--bg-primary);
    font-size: 0.9rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon:hover, .btn-icon:active {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: scale(0.95);
}

/* Search Container */
.search-container {
    display: none;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.3s ease;
}

.search-container.active {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-warning);
}

.btn-close {
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Status Bar */
.status-bar {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 100px;
    font-size: 0.75rem;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.pulse-dot.live { background: var(--accent-success); }
.pulse-dot.cached { background: var(--accent-warning); }
.pulse-dot.error { background: var(--accent-danger); }

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

/* ===========================
   Mobile Navigation
   =========================== */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding-bottom: var(--safe-area-bottom);
    z-index: 1000;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.7rem;
    font-family: inherit;
    font-weight: 500;
}

.nav-item.active {
    color: var(--accent-warning);
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

/* ===========================
   Slide-out Menu
   =========================== */
.slide-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: var(--bg-secondary);
    z-index: 2000;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom));
}

.slide-menu.active {
    right: 0;
}

.slide-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1rem;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
}

.slide-menu-header h3 {
    font-size: 1.25rem;
}

.slide-menu-content {
    padding: 1rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
}

.menu-item:hover, .menu-item:active {
    background: var(--bg-hover);
    transform: translateX(-5px);
}

.menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1rem 0;
}

.menu-section {
    margin-bottom: 1.5rem;
}

.menu-section h4 {
    font-size: 0.875rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.875rem;
}

.filter-btn.active {
    background: var(--accent-warning);
    color: var(--bg-primary);
    border-color: var(--accent-warning);
}

/* ===========================
   Main Container & Views
   =========================== */
.main-container {
    padding-top: calc(var(--header-height) + 40px);
    min-height: 100vh;
}

.view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { max-height: 0; opacity: 0; }
    to { max-height: 100px; opacity: 1; }
}

.view-header {
    padding: 1rem;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: calc(var(--header-height) + 40px);
    z-index: 100;
}

.view-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.quick-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.quick-filters::-webkit-scrollbar {
    display: none;
}

.quick-filter-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.875rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.quick-filter-btn.active,
.quick-filter-btn:active {
    background: var(--accent-warning);
    color: var(--bg-primary);
    border-color: var(--accent-warning);
}

.news-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===========================
   Coin List
   =========================== */
.coin-list {
    padding: 1rem;
}

.coin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.coin-item:active {
    transform: scale(0.98);
    border-color: var(--accent-warning);
}

.coin-item.selected {
    border-color: var(--accent-warning);
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.1), rgba(255, 170, 0, 0.05));
}

.coin-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.coin-rank {
    min-width: 24px;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 600;
}

.coin-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
}

.coin-icon-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.coin-icon-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent-warning), var(--accent-success));
}

.coin-details h3 {
    font-size: 1rem;
    font-weight: 600;
}

.coin-details p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.coin-stats {
    text-align: right;
}

.coin-price {
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.coin-change {
    font-size: 0.875rem;
}

.coin-change.positive { color: var(--accent-success); }
.coin-change.negative { color: var(--accent-danger); }

/* ===========================
   Analysis Content
   =========================== */
.analysis-content {
    padding: 1rem;
}

.coin-header {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.coin-header-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.coin-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.coin-header-icon-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--bg-tertiary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.coin-header-icon-fallback {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent-warning), var(--accent-success));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.coin-header-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.coin-header-rank {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.coin-header-price {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.price-main {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.75rem;
    font-weight: 600;
}

.price-change {
    font-size: 1.25rem;
}

.grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    font-size: 2rem;
    font-weight: 700;
    margin-top: 1rem;
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    margin: 1.5rem 0 1rem;
}

.sources-grid,
.risk-grid,
.analysis-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.source-card,
.risk-card,
.analysis-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.risk-card {
    border-left: 4px solid var(--border-color);
    cursor: pointer;
}

.risk-card.positive { border-left-color: var(--accent-success); }
.risk-card.warning { border-left-color: var(--accent-warning); }
.risk-card.critical { border-left-color: var(--accent-danger); }

.risk-card:active,
.analysis-card:active {
    transform: scale(0.98);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.card-title {
    font-weight: 600;
    font-size: 1rem;
}

.risk-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.risk-score {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.risk-weight {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.risk-summary {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

/* ===========================
   News List
   =========================== */
.news-list {
    padding: 1rem;
}

.news-item {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.news-item:active {
    transform: scale(0.98);
    border-color: var(--accent-warning);
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
}

.news-source {
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    font-weight: 600;
    color: var(--text-secondary);
}

.news-time {
    color: var(--text-dim);
}

.news-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.news-summary {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===========================
   Reports View
   =========================== */
.reports-grid {
    padding: 1rem;
    display: grid;
    gap: 1rem;
}

.report-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.report-card:active {
    transform: scale(0.98);
    border-color: var(--accent-warning);
}

.report-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.report-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.report-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-safe);
    border: none;
    border-radius: 12px;
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary:active {
    transform: scale(0.95);
}

/* ===========================
   Modals
   =========================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
}

.modal-header h3 {
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.modal-actions button {
    flex: 1;
    min-width: 140px;
}

.export-preview {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
}

/* Risk Modal Content */
.risk-modal-score {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.score-display {
    font-size: 2.5rem;
    font-weight: 700;
}

.score-bar-container {
    flex: 1;
}

.score-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.score-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.score-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.detail-list {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.detail-bullet {
    width: 6px;
    height: 6px;
    background: var(--accent-warning);
    border-radius: 50%;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.detail-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.metric-card {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Market Trends */
.trend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.trend-info {
    flex: 1;
}

.trend-period {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.trend-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.trend-icon {
    font-size: 2rem;
}

/* ===========================
   Overlay
   =========================== */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1500;
    backdrop-filter: blur(5px);
}

.overlay.active {
    display: block;
}

/* ===========================
   Loading & Empty States
   =========================== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-warning);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ===========================
   Tablet & Desktop Styles
   =========================== */
@media (min-width: 768px) {
    :root {
        --header-height: 70px;
        --nav-height: 0px;
    }
    
    body {
        padding-bottom: 0;
    }
    
    .mobile-nav {
        display: none;
    }
    
    .header-content {
        padding: 1rem 2rem;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .main-container {
        padding-top: calc(var(--header-height) + 40px);
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .sources-grid,
    .analysis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .risk-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reports-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .coin-item:hover {
        transform: translateX(5px);
        border-color: var(--accent-warning);
    }
    
    .news-item:hover,
    .report-card:hover {
        transform: scale(1.02);
        border-color: var(--accent-warning);
    }
}

@media (min-width: 1024px) {
    .sources-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .analysis-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .risk-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .slide-menu {
        max-width: 400px;
    }
}

@media (min-width: 1200px) {
    .risk-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   GOOD/BAD/UGLY TABS STYLING
   ============================================ */

/* Good/Bad/Ugly Tabs */
.gbu-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.gbu-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.gbu-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.gbu-tab.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gbu-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.gbu-item {
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: transform 0.2s ease;
}

.gbu-item:hover {
    transform: translateY(-2px);
}

.gbu-item:last-child {
    margin-bottom: 0;
}

.gbu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.gbu-item-header strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.gbu-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.gbu-item-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.empty-gbu {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .gbu-tabs {
        gap: 0.375rem;
        padding: 0.375rem;
    }
    
    .gbu-tab {
        font-size: 0.75rem;
        padding: 0.625rem 0.75rem;
    }
    
    .gbu-content {
        padding: 0.75rem;
    }
    
    .gbu-item {
        padding: 0.875rem;
    }
    
    .gbu-item-header strong {
        font-size: 0.9375rem;
    }
    
    .gbu-score {
        font-size: 0.8125rem;
        padding: 0.1875rem 0.375rem;
    }
    
    .gbu-item-text {
        font-size: 0.8125rem;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .gbu-tab.active {
        box-shadow: 0 2px 12px rgba(255,255,255,0.05);
    }
    
    .gbu-item:hover {
        box-shadow: 0 2px 8px rgba(255,255,255,0.05);
    }
}

/* Back Button for Desktop */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 2px solid var(--bg-tertiary);
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.back-button:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    transform: translateX(-4px);
}

.back-button svg {
    flex-shrink: 0;
}

/* Hide back button text on very small screens */
@media (max-width: 480px) {
    .back-button span {
        display: none;
    }
    
    .back-button {
        padding: 8px 12px;
    }
}
