/* style.css - Basic reset and layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #0f0c29, #302b63, #24243e);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    flex-direction: column;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 8px solid rgba(255, 255, 255, 0.1);
    border-top: 8px solid #00e5ff;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    margin-bottom: 25px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #fff;
    font-size: 1.2em;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
    letter-spacing: 1px;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease;
    max-width: 350px;
    backdrop-filter: blur(10px);
}

.toast-success {
    background: linear-gradient(135deg, #00b09b, #96c93d);
    border-left: 5px solid #00b09b;
}

.toast-error {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    border-left: 5px solid #ff416c;
}

.toast-warning {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    border-left: 5px solid #f7971e;
    color: #333;
}

.toast-info {
    background: linear-gradient(135deg, #2193b0, #6dd5ed);
    border-left: 5px solid #2193b0;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid rgba(0, 229, 255, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    color: #00e5ff;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
}

.modal-body {
    padding: 30px;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.dragover {
    border-color: #00e5ff !important;
    background: rgba(0, 229, 255, 0.1) !important;
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #00e5ff, #00bcd4);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #00bcd4, #0097a7);
}

/* Selection color */
::selection {
    background: rgba(0, 229, 255, 0.3);
    color: white;
}

/* Focus outlines */
:focus {
    outline: 2px solid #00e5ff;
    outline-offset: 2px;
}

/* Modal Content Styling */
.settings-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 4px solid #00e5ff;
}

.settings-section h3 {
    color: #00e5ff;
    margin-bottom: 20px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-item label {
    display: block;
    color: #ccc;
    margin-bottom: 10px;
    font-size: 1em;
    font-weight: 500;
}

.setting-item input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00e5ff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    accent-color: #00e5ff;
}

.setting-item select {
    width: 100%;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-size: 1em;
    outline: none;
}

.setting-item select:focus {
    border-color: #00e5ff;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.settings-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* EPG Modal */
.epg-modal .modal-body {
    padding: 0;
}

.epg-grid {
    display: grid;
    grid-template-columns: 150px repeat(24, 80px);
    overflow-x: auto;
}

.epg-time-header {
    position: sticky;
    left: 0;
    background: #1a1a2e;
    z-index: 2;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.epg-channel-cell {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 70px;
}

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

.epg-channel-name {
    color: white;
    font-weight: 600;
    font-size: 0.9em;
}

.epg-time-cell {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.01);
}

.epg-program-cell {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 70px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(0, 229, 255, 0.05);
}

.epg-program-cell:hover {
    background: rgba(0, 229, 255, 0.1);
    transform: scale(1.02);
}

.epg-program-cell.current {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(255, 64, 129, 0.2));
    border-left: 3px solid #00e5ff;
}

.epg-program-title {
    color: white;
    font-weight: 600;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.epg-program-time {
    color: #aaa;
    font-size: 0.8em;
}
/* Responsive breakpoints */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
}
