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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.header {
    text-align: center;
    background: linear-gradient(135deg, #2D2659 0%, #1a1438 100%);
    color: white;
    margin-bottom: 30px;
    padding: 40px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.logo-container {
    margin-bottom: 16px;
    display: inline-block;
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 36px;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    font-weight: 700;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.indicator.connected {
    background: #42D9C8;
}

.indicator.disconnected {
    background: #FF6B9D;
}

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

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

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

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.stat-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-allowed .stat-value { color: #42D9C8; }
.stat-blocked .stat-value { color: #FF6B9D; }
.stat-social .stat-value { color: #4D7CFE; }
.stat-gambling .stat-value { color: #FFB547; }
.stat-uptime .stat-value { font-size: 24px; }

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    font-size: 22px;
    color: #333;
}

.controls {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #42D9C8;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

.btn:hover {
    background: #35c4b4;
}

.btn:active {
    transform: scale(0.98);
}

.events-container {
    max-height: 600px;
    overflow-y: auto;
}

.event {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    border-left: 4px solid #ccc;
    background: #f8f9fa;
    animation: slideIn 0.3s ease-out;
}

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

.event.blocked {
    border-left-color: #FF6B9D;
    background: #fff0f5;
}

.event.allowed {
    border-left-color: #42D9C8;
    background: #e8f9f7;
}

.event-info {
    flex: 1;
}

.event-url {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    font-size: 14px;
    word-break: break-all;
}

.event-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #666;
}

.event-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.event-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.blocked {
    background: #FF6B9D;
    color: white;
}

.badge.allowed {
    background: #42D9C8;
    color: white;
}

.badge.social-media {
    background: #4D7CFE;
    color: white;
}

.badge.gambling {
    background: #FFB547;
    color: white;
}

.badge.other {
    background: #95a5a6;
    color: white;
}

.event-time {
    font-size: 12px;
    color: #999;
    min-width: 80px;
    text-align: right;
}

/* Scrollbar styling */
.events-container::-webkit-scrollbar {
    width: 8px;
}

.events-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.events-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.events-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 16px;
}

/* Responsive design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .event {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .event-time {
        text-align: left;
    }
}
