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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0f172a;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(16, 185, 129, 0.15) 0px, transparent 50%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 30px 0;
}

header h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.2em;
    color: #94a3b8;
    font-weight: 400;
}

.controls {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.5);
}

.btn-download {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-download:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.status {
    margin-left: auto;
    text-align: right;
}

#status {
    font-weight: 700;
    color: #60a5fa;
    display: block;
    font-size: 1.1em;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.5);
}

#progress {
    font-size: 0.9em;
    color: #94a3b8;
    margin-top: 4px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    border-color: rgba(148, 163, 184, 0.2);
}

.stat-value {
    font-size: 3em;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85em;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.filters {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    font-size: 14px;
    color: #e2e8f0;
    flex: 1;
    min-width: 200px;
    transition: all 0.3s;
}

.sort-select {
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    font-size: 14px;
    color: #e2e8f0;
    min-width: 180px;
    transition: all 0.3s;
}

.search-input::placeholder {
    color: #64748b;
}

.search-input:focus,
.sort-select:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sort-select {
    cursor: pointer;
}

.results {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    min-height: 400px;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
}

.empty-state p {
    font-size: 1.3em;
    margin-bottom: 12px;
    color: #cbd5e1;
}

.empty-state .small {
    font-size: 1em;
    color: #64748b;
}

.signal-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-left: 4px solid #3b82f6;
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 12px;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.3s;
}

.signal-card:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateX(4px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.15);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.signal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.signal-symbol {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.symbol {
    font-size: 1.8em;
    font-weight: 800;
    color: #60a5fa;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    -webkit-tap-highlight-color: rgba(96, 165, 250, 0.2);
    position: relative;
}

.symbol:hover,
.symbol:active {
    color: #a78bfa;
    background: rgba(96, 165, 250, 0.1);
    transform: translateY(-2px);
}

.price {
    font-size: 1.4em;
    color: #10b981;
    font-weight: 700;
}

.score-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 1.2em;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.signal-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
    font-size: 0.9em;
    color: #94a3b8;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.signals-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.signal-tag {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85em;
    color: #60a5fa;
    font-weight: 600;
    transition: all 0.2s;
}

.signal-tag:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.signal-tag.highlight {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Score color coding */
.score-badge.excellent { 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%); 
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}
.score-badge.good { 
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); 
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}
.score-badge.moderate { 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); 
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    header h1 {
        font-size: 2.2em;
    }

    .subtitle {
        font-size: 1em;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .status {
        margin-left: 0;
        text-align: left;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .signal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .stat-value {
        font-size: 2.5em;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}
