body {
    background-color: #1a1a1a;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    background-color: #2a2a2a;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    padding: 25px;
    margin-top: 30px;
    max-width: 1400px;
}

h2 {
    text-align: center;
    color: #00a0fc;
    margin-bottom: 25px;
    font-weight: 600;
}

#playlist {
    max-height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #00a0fc #2a2a2a;
}

#playlist::-webkit-scrollbar {
    width: 8px;
}

#playlist::-webkit-scrollbar-track {
    background: #2a2a2a;
}

#playlist::-webkit-scrollbar-thumb {
    background-color: #00a0fc;
    border-radius: 4px;
}

.list-group-item {
    background-color: #333333;
    border: none;
    margin-bottom: 5px;
    border-radius: 8px;
    color: #ffffff;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    position: relative;
}

.list-group-item:hover {
    background-color: #404040;
    transform: translateX(5px);
    color: #ffffff;
    text-decoration: none;
}

.list-group-item.active {
    background-color: #00a0fc;
    border: none;
}

.channel-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 15px;
    object-fit: cover;
}

.channel-name {
    font-size: 16px;
    font-weight: 500;
}

#videoPlayer {
    width: 100%;
    height: auto;
    min-height: 400px;
    border-radius: 12px;
    margin-top: 10px;
    background-color: #000000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.form-control {
    background-color: #333333;
    border: 2px solid #404040;
    color: #ffffff;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.form-control:focus {
    background-color: #404040;
    border-color: #00a0fc;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(0, 160, 252, 0.25);
}

.form-control::placeholder {
    color: #888888;
}

.ui-autocomplete {
    background-color: #333333;
    border: none;
    border-radius: 8px;
    padding: 5px;
    max-height: 300px;
    overflow-y: auto;
}

.ui-autocomplete .ui-menu-item {
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 5px;
}

.ui-autocomplete .ui-menu-item:hover {
    background-color: #00a0fc;
    color: #ffffff;
}

/* Verification System Styles */
#verify-all-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    z-index: 1001;
}

#verification-status {
    position: fixed;
    bottom: 60px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
    border-radius: 8px;
    z-index: 1001;
    display: none;
    min-width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#channel-filters {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    background-color: #333;
    color: #fff;
}

.filter-btn.active {
    background-color: #007bff;
}

.filter-btn:hover {
    opacity: 0.8;
}

.filter-btn .count {
    background-color: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.channel-status {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    background-color: rgba(0,0,0,0.2);
}

.status-working { color: #28a745; }
.status-blocked { color: #dc3545; }
.status-error { color: #ffc107; }

/* Error Tooltip Styles */
.error-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: normal;
    line-height: 1.4;
    border-left: 4px solid;
}

.error-tooltip.blocked {
    border-left-color: #dc3545;
}

.error-tooltip.error {
    border-left-color: #ffc107;
}

.error-tooltip .error-time {
    color: #888;
    font-size: 11px;
    margin-top: 5px;
    display: block;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin-top: 15px;
    }
    #playlist {
        max-height: 300px;
        margin-bottom: 20px;
    }
    #videoPlayer {
        min-height: 250px;
    }
}

/* Error Log Styles */
#error-log-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

#error-log-toggle.hidden {
    display: none;
}

#error-log-toggle .error-count {
    background-color: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
}

#error-log-container {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background-color: #2a2a2a;
    border-radius: 8px;
    width: 400px;
    max-height: 500px;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    display: none;
    z-index: 1000;
}

#error-log-container.show {
    display: block;
}

#error-log {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-item {
    padding: 10px 15px;
    border-bottom: 1px solid #404040;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.error-item:last-child {
    border-bottom: none;
}

.error-channel {
    font-weight: bold;
    color: #00a0fc;
    margin-right: 8px;
}

.error-time {
    color: #888;
    font-size: 12px;
}

.clear-log {
    padding: 10px 15px;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    text-align: center;
    border-bottom: 1px solid #404040;
}

.clear-log:hover {
    background-color: #404040;
}

.blocked-channel {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Stats Container Styles */
#stats-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    display: none;
    z-index: 1001;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #404040;
}

.stats-close {
    font-size: 24px;
    color: #888;
    cursor: pointer;
    padding: 5px;
}

.stats-close:hover {
    color: #fff;
}

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

.stat-card {
    background-color: #333;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    color: #888;
    font-size: 14px;
}

.stat-card.working .stat-number { color: #28a745; }
.stat-card.geo-blocked .stat-number { color: #dc3545; }
.stat-card.not-24-7 .stat-number { color: #ffc107; }
.stat-card.connection-refused .stat-number { color: #fd7e14; }
.stat-card.timeout .stat-number { color: #17a2b8; }
.stat-card.unknown .stat-number { color: #6c757d; }

.channel-list {
    background-color: #333;
    border-radius: 8px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

/* Responsive Styles for Stats and Error Log */
@media (max-width: 768px) {
    #error-log-container {
        width: 90%;
        right: 5%;
        left: 5%;
        bottom: 80px;
    }

    #stats-container {
        width: 95%;
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-label {
        font-size: 12px;
    }
}

/* Badge Styles for Error Types */
.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: normal;
    margin-left: 5px;
}

.badge-danger { background-color: #dc3545; }
.badge-warning { background-color: #ffc107; color: #000; }
.badge-info { background-color: #17a2b8; }
.badge-secondary { background-color: #6c757d; } 