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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    color: #667eea;
    font-size: 28px;
    font-weight: 600;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 25px;
    background: #f8f9fa;
    font-weight: 500;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6c757d;
    animation: pulse 2s infinite;
}

.status-indicator.status-success .status-dot {
    background: #28a745;
}

.status-indicator.status-warning .status-dot {
    background: #ffc107;
}

.status-indicator.status-danger .status-dot {
    background: #dc3545;
}

.status-indicator.status-info .status-dot {
    background: #17a2b8;
}

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

main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.video-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

#video {
    width: 100%;
    height: auto;
    display: block;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card, .violations-card, .stats-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.info-item, .stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child, .stat-item:last-child {
    border-bottom: none;
}

.info-item span, .stat-item span {
    color: #666;
}

.info-item strong, .stat-item strong {
    color: #333;
    font-weight: 600;
}

.violations-card {
    flex: 1;
}

.violations-list {
    max-height: 300px;
    overflow-y: auto;
}

.violations-list::-webkit-scrollbar {
    width: 6px;
}

.violations-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.violations-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.violations-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.no-violations {
    text-align: center;
    color: #28a745;
    padding: 20px;
    font-style: italic;
}

.violation-item {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid;
    background: #f8f9fa;
    animation: slideIn 0.3s ease;
}

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

.violation-warning {
    border-left-color: #ffc107;
    background: #fff3cd;
}

.violation-danger {
    border-left-color: #dc3545;
    background: #f8d7da;
}

.violation-time {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.violation-message {
    display: block;
    font-weight: 500;
    color: #333;
}

.instructions {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.instructions h3 {
    border: none;
    margin-bottom: 15px;
}

.instructions ul {
    list-style-position: inside;
    color: #666;
}

.instructions li {
    padding: 8px 0;
    line-height: 1.6;
}

/* Responsive design */
@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .info-section {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .info-section {
        grid-template-columns: 1fr;
    }
}
