/* Modern CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    min-height: 100%;
    font-family: -apple-system, JetBrains Mono, 'Segoe UI', 'Space Grotesk', system-ui, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #e4e4e7;
    background: #0a0a0f;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    overflow-x: hidden;
    overflow-y: auto;
}

/* Custom scrollbar for page */
body::-webkit-scrollbar,
html::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track,
html::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

body::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

body::-webkit-scrollbar-thumb:hover,
html::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.header-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.header-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.5));
}

.header-subtitle {
    color: #a1a1aa;
    font-size: 1rem;
    font-weight: 400;
}

/* Main Content */
.main-content {
    flex: 1;
    padding-bottom: 2rem;
}

/* Monitor Card */
.monitor-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.monitor-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f4f4f5;
}

.refresh-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #a1a1aa;
    font-size: 0.875rem;
}

.refresh-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s ease-in-out infinite;
}

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

.card-body {
    padding: 1.5rem;
}

/* Monitor Data */
.monitor-data {
    width: 100%;
}

.monitor-data table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    table-layout: fixed;
}

.monitor-data thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    display: table-header-group;
}

.monitor-data thead tr {
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

.monitor-data th {
    text-align: left;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #d4d4d8;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.monitor-data th.height_cell {
    text-align: right;
}

.monitor-data tbody {
    display: table-row-group;
}

.monitor-data tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.monitor-data tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.monitor-data td {
    padding: 1rem 1.25rem;
    color: #e4e4e7;
}

/* Status Styles */
.red_status {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-left: 3px solid #ef4444;
}

.red_status:hover {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.25) 0%, rgba(239, 68, 68, 0.1) 100%);
}

.green_status {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-left: 3px solid #10b981;
}

.green_status:hover {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.1) 100%);
}

.status_cell {
    width: 120px;
    font-weight: 1000;
    position: relative;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    letter-spacing: 0.05em;
    text-align: left;
}

.status_cell::before {
    display: none;
}

.green_status .status_cell {
    color: #10b981;
}

.red_status .status_cell {
    color: #ef4444;
}

.ticker_cell {
    width: 150px;
    font-weight: 600;
    color: #f4f4f5;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    letter-spacing: 0.05em;
    text-align: left;
}

.height_cell {
    text-align: right;
    width: auto;
    color: #f4f4f5;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #a1a1aa;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-state p {
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .header-title {
        font-size: 1.75rem;
    }

    .header-icon {
        font-size: 1.75rem;
    }

    .card-header {
        padding: 1rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    .monitor-data th {
        padding: 0.75rem 0.5rem;
        font-size: 1rem;
    }

    .monitor-data td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .status_cell,
    .ticker_cell {
        width: auto;
    }
}

/* Smooth transitions for data updates */
.monitor-data tbody tr {
    animation: fadeIn 0.3s ease-in;
}

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