/* css/style.css */
:root {
    --primary-color: #3EA6FF; /* VideoIL Blue */
    --accent-blue: #00aaff;   /* Logo Box Blue */
    --bg-color: #f9f9f9;
    --sidebar-width: 240px;
    --header-height: 56px;
    --text-main: #0f0f0f;
    --text-sec: #606060;
    --border-color: #e5e5e5;
    --hover-bg: #f2f2f2;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    direction: rtl; 
    overflow-x: hidden;
    /* ריווח מהצד עבור הסיידבר החדש */
    padding-right: var(--sidebar-width);
}

/* --- Header & Logo --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1001;
    border-bottom: 1px solid var(--border-color);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 30px;
    height: 30px;
    background-color: var(--accent-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* --- Sidebar (התפריט החדש) --- */
.sidebar-wrapper {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: #fff;
    padding: 12px 0;
    overflow-y: auto;
    z-index: 1000;
    border-left: 1px solid var(--border-color);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: 48px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 15px;
    transition: background 0.1s;
    cursor: pointer;
}

.nav-item:hover { background-color: var(--hover-bg); }

.nav-icon {
    margin-left: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Search Bar --- */
.search-bar {
    display: flex;
    flex: 0 1 600px;
    direction: ltr;
}

.search-bar input {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 40px 40px 0;
    font-size: 16px;
    outline: none;
    direction: rtl;
}

.search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.search-bar button {
    background: #f8f8f8;
    border: 1px solid #ccc;
    padding: 0 20px;
    border-radius: 40px 0 0 40px;
    cursor: pointer;
    transition: background 0.2s;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-login {
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Main Grid --- */
.main-container {
    margin-top: var(--header-height);
    padding: 24px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.video-card {
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 8px;
    border-radius: 12px;
}

.video-card:hover {
    transform: scale(1.03);
    background-color: #fff;
    box-shadow: var(--shadow);
}

.thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Engagement Tools & Likes --- */
.engagement-tools {
    display: flex;
    background: #f2f2f2;
    border-radius: 20px;
    overflow: hidden;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

/* סימון כפתור פעיל */
.action-btn.btn-active {
    color: var(--primary-color);
}

.action-btn.btn-active svg {
    fill: var(--primary-color);
}

/* --- הודעת תרומה מעוצבת --- */
.system-message-box {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- Verified Badge (הקוד המקורי שלך) --- */
.verified-icon {
    display: inline-block;
    width: 21px;
    height: 21px;
    background-color: #3ea6ff;
    clip-path: polygon(
        50% 0%, 65% 15%, 85% 15%, 85% 35%, 100% 50%, 85% 65%, 
        85% 85%, 65% 85%, 50% 100%, 35% 85%, 15% 85%, 15% 65%, 
        0% 50%, 15% 35%, 15% 15%, 35% 15%
    );
    position: relative;
    vertical-align: middle;
    margin-right: 4px;
    flex-shrink: 0;
}

.verified-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 3px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: translate(-50%, -70%) rotate(-45deg);
}

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

@keyframes shimmer {
    0% { background-position: -468px 0; }
    100% { background-position: 468px 0; }
}

.skeleton {
    background: #f6f7f8;
    background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-repeat: no-repeat;
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
}

#particles-js {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; pointer-events: none;
}

@media (max-width: 1000px) {
    body { padding-right: 0; }
    .sidebar-wrapper { display: none; }
}

/* כפתור הירשם (ברירת מחדל - אדום) */
.btn-subscribe {
    background-color: #cc0000; /* YouTube Red */
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 18px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-right: auto; /* דוחף את הכפתור שמאלה אם יש flex */
}

.btn-subscribe:hover {
    background-color: #b30000;
}

/* כפתור "מנוי" (מצב פעיל - אפור) */
.btn-subscribe.subscribed {
    background-color: #f2f2f2;
    color: #606060;
}

.btn-subscribe.subscribed:hover {
    background-color: #e5e5e5;
}