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

body {
    background: #191f59;
    color: white;
    font-family: 'Arial', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, #1e3a8a 0%, #191f59 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #0879d6;
}

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

.header h1 {
    font-size: 50px;
    margin-bottom: 5px;
    padding-left: 15px;
    padding-left: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    /* width: 90%; */
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 20px;
    font-size: 23px;
    font-weight: bold;
    opacity: 0.9;
}

.qr-codes {
    display: flex;
    gap: 60px;
    align-items: center;
}

.qr-card {
    background: white;
    border-radius: 12px;
    padding: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.qr-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 4px;
}

.qr-label {
    font-size: 11px;
    color: #191f59;
    font-weight: bold;
}

.datetime-bar {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 30px;
    font-weight: bold;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.datetime-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.counters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
}

.counter-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.counter-card.left {
    border-top: 6px solid #2196f3;
}

.counter-card.right {
    border-top: 6px solid #f44336;
}

.counter-label {
    font-size: 30px;
    color: #666;
    font-weight: bold;
    margin-bottom: 8px;
}

.counter-value {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 4px;
}

.counter-card.left .counter-value {
    color: #2196f3;
}

.counter-card.right .counter-value {
    color: #f44336;
}

.counter-subtitle {
    font-size: 14px;
    color: #999;
}

.chart-container {
    flex: 1;
    padding: 15px;
    position: relative;
    min-height: 0;
}

.chart-wrapper {
    background: white;
    border-radius: 16px;
    padding: 20px;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 24px;
    color: #666;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 45px;
    font-weight: bold;
    color: #191f59;
}

.connection-status {
    /* position: fixed; */
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: bold;
    z-index: 100;
}

.status-connected {
    background: #4caf50;
    color: white;
}

.status-connecting {
    background: #ff9800;
    color: white;
}

.status-disconnected {
    background: #f44336;
    color: white;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(25, 31, 89, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top: 6px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 20px;
    font-size: 24px;
    color: white;
    font-weight: bold;
}

.footer {
    background: linear-gradient(135deg, #191f59 0%, #1e3a8a 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 4px solid #0879d6;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-title {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.footer-subtitle {
    font-size: 20px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
}

.footer-qr-codes {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-qr-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s, background 0.2s;
}

.footer-qr-card:hover {
    transform: translateY(-3px);
    background: white;
}

.footer-qr-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 5px;
}

.footer-qr-label {
    font-size: 11px;
    color: #191f59;
    font-weight: bold;
}