* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0f1117;
    color: #e1e4e8;
    min-height: 100vh;
}

.header {
    background: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #58a6ff;
}

.header .subtitle {
    font-size: 13px;
    color: #8b949e;
}

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

.category-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8b949e;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #21262d;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: #58a6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.card-icon {
    font-size: 28px;
    width: 40px;
    text-align: center;
}

.card-name {
    font-size: 16px;
    font-weight: 600;
}

.card-symbol {
    font-size: 12px;
    color: #8b949e;
}

.card-price {
    font-size: 24px;
    font-weight: 700;
    margin: 8px 0;
}

.card-change {
    font-size: 14px;
    font-weight: 500;
}

.change-positive { color: #3fb950; }
.change-negative { color: #f85149; }

.signal-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    margin-top: 12px;
}

.signal-green { background: rgba(63,185,80,0.15); color: #3fb950; border: 1px solid rgba(63,185,80,0.3); }
.signal-red { background: rgba(248,81,73,0.15); color: #f85149; border: 1px solid rgba(248,81,73,0.3); }
.signal-yellow { background: rgba(210,153,34,0.15); color: #d29922; border: 1px solid rgba(210,153,34,0.3); }

.card-loading {
    text-align: center;
    color: #8b949e;
    padding: 8px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px;
}

.modal-close {
    float: right;
    background: none;
    border: none;
    color: #8b949e;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
}

.modal-close:hover { color: #e1e4e8; }

.modal h2 {
    font-size: 22px;
    margin-bottom: 4px;
}

.modal .modal-symbol {
    color: #8b949e;
    font-size: 14px;
    margin-bottom: 20px;
}

.modal-signal {
    text-align: center;
    padding: 20px;
    margin: 16px 0;
    border-radius: 12px;
}

.modal-signal .signal-text {
    font-size: 36px;
    font-weight: 800;
}

.modal-signal .signal-summary {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.5;
}

.modal-details {
    background: #0d1117;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.7;
    color: #c9d1d9;
}

.indicators-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

.indicator-item {
    background: #0d1117;
    border-radius: 8px;
    padding: 12px;
}

.indicator-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #8b949e;
    letter-spacing: 0.5px;
}

.indicator-value {
    font-size: 18px;
    font-weight: 600;
    margin-top: 4px;
}

.spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid #30363d;
    border-top-color: #58a6ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
    .grid { grid-template-columns: 1fr; }
    .indicators-grid { grid-template-columns: 1fr; }
    .container { padding: 16px; }
    .modal { padding: 20px; }
}
