:root {
    --primary-color: #1a73e8;
    --secondary-color: #0d47a1;
    --accent-color: #ff6d00;
    --success-color: #00c853;
    --danger-color: #d50000;
    --light-color: #f5f7fa;
    --dark-color: #1e3a5f;
    --text-color: #333;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: var(--gradient);
    color: white;
    padding: 40px 0;
    text-align: center;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
}

.logo {
    font-size: 2.8rem;
    margin-bottom: 15px;
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}

.card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.card h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2 i {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #f9f9f9;
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
    background: white;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-success:hover {
    background-color: #00b248;
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #b71c1c;
}

.btn-accent {
    background-color: var(--accent-color);
}

.btn-accent:hover {
    background-color: #e65100;
}

.btn-block {
    display: flex;
    width: 100%;
}

.channel-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid #eee;
}

.channel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

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

.channel-item:hover {
    background-color: #f9f9f9;
}

.channel-info {
    flex: 1;
}

.channel-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.channel-url {
    font-size: 0.9rem;
    color: #666;
    word-break: break-all;
}

.channel-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #777;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    color: var(--primary-color);
    background: rgba(26, 115, 232, 0.1);
}

.delete-btn:hover {
    color: var(--danger-color);
    background: rgba(213, 0, 0, 0.1);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #777;
}

.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: #ddd;
}

.preview-section {
    margin-top: 30px;
}

.preview-content {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    line-height: 1.8;
    direction: ltr;
    text-align: left;
}

.instructions {
    background: var(--gradient);
    color: white;
    border-radius: 16px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: var(--shadow);
}

.instructions h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
}

.instructions ol {
    padding-right: 20px;
}

.instructions li {
    margin-bottom: 15px;
    padding-right: 10px;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 25px;
    color: #777;
    border-top: 1px solid #eee;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    text-align: center;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    flex: 1;
    margin: 0 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 1rem;
    color: #666;
}

.file-name {
    background: #e3f2fd;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--secondary-color);
}

.buttons-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .buttons-container {
        flex-direction: column;
    }
    
    .buttons-container .btn {
        width: 100%;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .container {
        padding: 15px;
    }
    
    header {
        padding: 30px 0;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .dashboard {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .logo {
        width: 70px;
        height: 70px;
        line-height: 70px;
        font-size: 2.2rem;
    }
    
    .stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        margin: 0;
    }
    
    .instructions {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    header {
        padding: 25px 0;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 15px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .preview-content {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .instructions ol {
        padding-right: 15px;
    }
    
    .instructions li {
        font-size: 0.9rem;
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s;
}

.notification.success {
    background: var(--success-color);
}

.notification.info {
    background: var(--primary-color);
}
