/* Dark Theme - ป้องกันแสบตา */

/* สีพื้นหลัง */
body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    color: #e0e0e0 !important;
}

/* สี container */
.main-container {
    background: rgba(30, 30, 45, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header */
header {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Search bar */
.search-box {
    background: rgba(45, 55, 72, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#searchInput {
    background: rgba(30, 30, 45, 0.9) !important;
    color: #e0e0e0 !important;
    border: 2px solid rgba(99, 102, 241, 0.3) !important;
}

#searchInput:focus {
    border-color: rgba(99, 102, 241, 0.6) !important;
    background: rgba(30, 30, 45, 1) !important;
}

/* Channel cards */
.channel-card {
    background: rgba(45, 55, 72, 0.8) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease;
}

.channel-card:hover {
    background: rgba(55, 65, 85, 0.9) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* สีข้อความ */
.channel-card h3 {
    color: #e0e0e0 !important;
}

.channel-card p {
    color: #a0a0a0 !important;
}

/* Category headers */
.category-section h2 {
    color: #e0e0e0 !important;
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
    padding-bottom: 8px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    color: #a0a0a0 !important;
}

/* Buttons */
.bg-purple-600 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.bg-purple-600:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
}

.bg-white {
    background: rgba(45, 55, 72, 0.9) !important;
    color: #e0e0e0 !important;
}

.bg-white:hover {
    background: rgba(55, 65, 85, 0.9) !important;
}

/* Status colors */
.text-gray-600 {
    color: #a0a0a0 !important;
}

.text-gray-500 {
    color: #808080 !important;
}

.text-gray-800 {
    color: #e0e0e0 !important;
}

/* Loading state */
#loadingState {
    background: rgba(30, 30, 45, 0.9) !important;
    color: #e0e0e0 !important;
}

/* Search status */
#searchStatus {
    color: #a0a0a0 !important;
}

.text-yellow-600 {
    color: #f6d55c !important;
}

.text-blue-600 {
    color: #63b3ed !important;
}

.text-green-600 {
    color: #68d391 !important;
}

.text-red-600 {
    color: #fc8181 !important;
}

/* Tags and badges */
.bg-purple-100 {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #a5b4fc !important;
}

.bg-blue-100 {
    background: rgba(66, 153, 225, 0.2) !important;
    color: #90cdf4 !important;
}

.bg-green-100 {
    background: rgba(72, 187, 120, 0.2) !important;
    color: #9ae6b4 !important;
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(45, 55, 72, 0.9) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    color: #e0e0e0 !important;
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.theme-toggle:hover {
    background: rgba(55, 65, 85, 0.9) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    transform: scale(1.05);
}

/* Dark mode indicator */
.dark-mode-indicator {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #a5b4fc !important;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .theme-toggle {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .main-container {
        background: rgba(30, 30, 45, 0.98) !important;
    }
}

/* Smooth transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

::-webkit-scrollbar-track {
    background: rgba(30, 30, 45, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

/* Player specific dark theme */
.player-container {
    background: rgba(20, 20, 30, 0.95) !important;
}

.tv-frame {
    background: #000 !important;
    border: 8px solid rgba(45, 55, 72, 0.8) !important;
}

.channel-info {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
}

/* Control buttons */
.control-btn {
    background: rgba(45, 55, 72, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.control-btn:hover {
    background: rgba(55, 65, 85, 0.9) !important;
}

/* Source buttons */
.bg-gray-700 {
    background: rgba(45, 55, 72, 0.8) !important;
    color: #e0e0e0 !important;
}

.bg-gray-700:hover {
    background: rgba(55, 65, 85, 0.9) !important;
}

/* Error info box */
.bg-yellow-900 {
    background: rgba(45, 55, 72, 0.9) !important;
    border: 1px solid rgba(246, 213, 92, 0.3) !important;
}

/* Light theme (for toggle) */
.light-theme body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #333 !important;
}

.light-theme .main-container {
    background: rgba(255, 255, 255, 0.95) !important;
}

.light-theme .channel-card {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
}

.light-theme header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.light-theme #searchInput {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #333 !important;
}

.light-theme .channel-card h3 {
    color: #333 !important;
}

.light-theme .channel-card p {
    color: #666 !important;
}

.light-theme .text-gray-600 {
    color: #666 !important;
}

.light-theme .text-gray-800 {
    color: #333 !important;
}
