/* 🎨 ARKAL CRYPTO MONITOR - CSS CONDIVISO */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e, #0f3460);
    color: #00ff41;
    font-family: 'Courier New', monospace;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Matrix Background Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: -1;
    background-image: 
        radial-gradient(circle at 25% 25%, #00ff41 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, #00ff41 1px, transparent 1px);
    background-size: 50px 50px;
    animation: matrix-move 20s linear infinite;
}

@keyframes matrix-move {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #0a0a0a, #1a1a2e);
    padding: 30px;
    border-radius: 20px;
    border: 3px solid #00ff41;
    box-shadow: 
        0 0 50px rgba(0, 255, 65, 0.3),
        inset 0 0 30px rgba(0, 255, 65, 0.1);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 65, 0.1), transparent);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

.header h1 {
    font-size: 3rem;
    text-shadow: 0 0 30px #00ff41;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.header p {
    font-size: 1.2rem;
    color: #00cc33;
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
}

/* Status Indicators */
.status-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 255, 65, 0.1);
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid #00ff41;
    font-size: 0.9rem;
}

.pulse {
    width: 12px;
    height: 12px;
    background: #00ff41;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    background: linear-gradient(45deg, #00ff41, #00cc33);
    color: #000;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    background: linear-gradient(45deg, #00cc33, #00ff41);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.6);
    transform: translateY(-3px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn.primary {
    background: linear-gradient(45deg, #00ff41, #00cc33);
    color: #000;
}

.btn.secondary {
    background: linear-gradient(45deg, #333, #555);
    color: #00ff41;
}

.btn.danger {
    background: linear-gradient(45deg, #ff4444, #cc0000);
    color: #fff;
}

.btn-link {
    color: #00ff41;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-link:hover {
    background: rgba(0, 255, 65, 0.1);
    text-shadow: 0 0 10px #00ff41;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 65, 0.3);
}

.filter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 0.9rem;
    color: #00ff41;
    font-weight: bold;
}

.filter-group select {
    background: #333;
    border: 1px solid #00ff41;
    color: #00ff41;
    padding: 8px 12px;
    border-radius: 5px;
    font-family: inherit;
}

.filter-group select:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Main Content */
.main-content {
    position: relative;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    color: #00ff41;
    font-size: 1.5rem;
    text-shadow: 0 0 15px #00ff41;
}

.auto-refresh-info {
    font-size: 0.9rem;
    color: #00cc33;
    background: rgba(0, 255, 65, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 65, 0.3);
}

/* Loading States */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #00ff41;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 255, 65, 0.3);
    border-left: 4px solid #00ff41;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 2px dashed rgba(0, 255, 65, 0.3);
}

.empty-state h3 {
    color: #00ff41;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.empty-state p {
    color: #ccc;
    margin-bottom: 20px;
}

.error-state {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 15px;
    border: 2px solid #ff4444;
}

.error-state h3 {
    color: #ff4444;
    margin-bottom: 15px;
}

/* Panels */
.panel {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #00ff41;
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.2);
}

.panel h3 {
    color: #00ff41;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
    text-shadow: 0 0 15px #00ff41;
}

/* Exchange Status */
.exchange-status-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid rgba(0, 255, 65, 0.2);
}

.exchange-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-badge.online {
    background: #00ff41;
    color: #000;
}

.status-badge.offline {
    background: #ff4444;
    color: #fff;
}

.exchange-details {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #ccc;
    flex-wrap: wrap;
}

.exchange-details .error {
    color: #ff4444;
    font-weight: bold;
}

/* Debug Logs */
.debug-logs {
    background: #000;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.debug-logs div {
    margin-bottom: 3px;
    color: #ccc;
    white-space: pre-wrap;
}

/* Utility Classes */
.positive {
    color: #00ff41 !important;
}

.negative {
    color: #ff4444 !important;
}

.neutral {
    color: #ffaa00 !important;
}

.text-center {
    text-align: center;
}

.text-small {
    font-size: 0.8rem;
}

.text-large {
    font-size: 1.2rem;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #00ff41;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc33;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .status-indicators {
        flex-direction: column;
        gap: 10px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .exchange-details {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .panel {
        padding: 15px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Hover Effects */
.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
    transition: box-shadow 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Focus Styles */
button:focus,
select:focus,
input:focus {
    outline: 2px solid #00ff41;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .header,
    .controls,
    .filter-controls {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    body {
        background: #000;
    }
    
    .header,
    .panel {
        border-width: 3px;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (already dark, but for completeness) */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark mode */
}

/* Custom Properties for Easy Theming */
:root {
    --primary-color: #00ff41;
    --primary-dark: #00cc33;
    --secondary-color: #ffaa00;
    --danger-color: #ff4444;
    --background-dark: #0a0a0a;
    --background-medium: #1a1a2e;
    --background-light: #16213e;
    --text-primary: #00ff41;
    --text-secondary: #ccc;
    --border-color: rgba(0, 255, 65, 0.3);
    --shadow-color: rgba(0, 255, 65, 0.2);
    
    --font-primary: 'Courier New', monospace;
    --font-size-large: 3rem;
    --font-size-medium: 1.2rem;
    --font-size-small: 0.9rem;
    
    --border-radius-small: 5px;
    --border-radius-medium: 10px;
    --border-radius-large: 15px;
    
    --spacing-small: 10px;
    --spacing-medium: 20px;
    --spacing-large: 30px;
}