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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

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

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.status-bar {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.status-item {
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.status-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.status-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Roboto Mono', monospace;
}

.status-value.connected {
    color: #10b981;
}

.status-value.disconnected {
    color: #ef4444;
}

.current-run {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    text-align: center;
}

.run-status {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 20px;
}

.run-status.active {
    color: #f59e0b;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.current-time {
    font-size: 5rem;
    font-weight: bold;
    font-family: 'Roboto Mono', monospace;
    color: #667eea;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.current-time.finished {
    color: #10b981;
    animation: celebrate 0.5s ease-out;
}

@keyframes celebrate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.leaderboard {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.leaderboard h2 {
    margin-bottom: 20px;
    color: #667eea;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f3f4f6;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #e5e7eb;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
}

tbody tr:hover {
    background: #f9fafb;
}

tbody tr.no-data {
    text-align: center;
    color: #999;
    font-style: italic;
}

tbody tr.new-run {
    animation: highlight 1s ease-out;
}

@keyframes highlight {
    0% { background: #fef3c7; }
    100% { background: transparent; }
}

.run-number {
    font-weight: bold;
    color: #667eea;
}

.run-time {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.2rem;
    font-weight: bold;
}

.best-time {
    color: #10b981;
}

.demo-controls {
    background: rgba(255,255,255,0.9);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.demo-controls h3 {
    margin-bottom: 10px;
    color: #667eea;
}

.demo-controls p {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
}

.demo-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s;
}

.demo-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

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

footer {
    text-align: center;
    color: white;
    padding: 20px;
    opacity: 0.8;
}

footer a {
    color: white;
    text-decoration: underline;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .current-time {
        font-size: 3rem;
    }
    
    .status-bar {
        flex-direction: column;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 10px;
    }
}
