/* Container Settings */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-left: 200px; /* Sidebar එකට ඉඩ */
    padding: 30px;
    background-color: #fff9fa; /* ඉතා ලා රෝස පැහැති පසුබිම */
}

/* Main Card */
.media-card {
    background: #ffffff;
    border-radius: 20px; /* රූපයේ ඇති පරිදි සිනිඳු වටකුරු බව */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: none; /* Border එක අයින් කරමු */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04); /* ඉතා සැහැල්ලු shadow එකක් */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    cursor: pointer;
}

.media-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(255, 182, 193, 0.2); /* Hover එකේදී රෝස පැහැති shadow එක */
}

/* Thumbnail Area */
.card-image-box {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Ratio */
    overflow: hidden;
}

.card-image-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Featured Badge (රූපයේ ඇති රතු පාට එක) */
.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff6b81; /* Soft Red/Pink */
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Duration Tag */
.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    backdrop-filter: blur(2px);
}

/* Content Area */
.card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.yt-title {
    font-size: 14px;
    color: #2d3436;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    /* පේළි 2කට සීමා කිරීම */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.more-icon {
    color: #b2bec3;
    font-size: 14px;
    padding-left: 5px;
}

.card-subtitle {
    font-size: 12px;
    color: #636e72;
    margin-top: 5px;
}

/* Card Footer (Channel info & Views) */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f1f2f6;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-info::before {
    content: "👤"; /* රූපයේ ඇති පරිදි user icon එකක් (ඔයාට image එකක් වුනත් දාන්න පුළුවන්) */
    font-size: 12px;
    color: #ff6b81;
}

.yt-channel {
    font-size: 11px;
    color: #2d3436;
    font-weight: 500;
}

.verify-tick {
    font-size: 9px;
    color: #ff6b81;
    margin-left: 2px;
}

.view-count {
    font-size: 11px;
    color: #b2bec3;
    font-weight: 400;
}


