:root {
    --primary-color: #6200ea;
    --primary-dark: #3700b3;
    --accent-color: #FF4081;
    --text-color: #333;
    --background-light: #f0f4ff;
    --background-dark: #121212;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Vazirmatn', Arial, sans-serif;
    background-color: var(--background-light);
    color: var(--text-color);
    line-height: 1.6;
    direction: rtl;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: var(--background-dark);
    color: white;
}

header {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1.5em 0;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2em;
    font-weight: 500;
}

.container {
    max-width: 1000px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

input[type="text"],
input[type="password"] {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* List Styles */
ul {
    list-style: none;
    padding: 0;
}

li {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Video Container Styles */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.video-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f2f2f2;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.video-item h2 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

iframe {
    width: 100%;
    height: 315px;
    border: none;
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    text-align: center;
}

.loading.active {
    display: block;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: opacity 0.5s ease-in-out;
    opacity: 0;
}

.toast.show {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 1rem;
        padding: 1rem;
    }
    
    header {
        padding: 1rem 0;
    }
    
    iframe {
        height: 240px;
    }
}