:root {
    --primary-color: #007bff;
    --secondary-color: #ffc107;
    --background-color: #121212;
    --card-background: #1e1e1e;
    --text-color: #e0e0e0;
    --text-color-muted: #888;
    --navbar-height: 60px;
    --border-color: #333;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    padding-bottom: var(--navbar-height);
}

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

/* Premium Page Header */
.premium-header {
    text-align: center;
    background: var(--card-background);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}
.premium-header .premium-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
}
.premium-header h2 {
    margin: 10px 0;
}
.premium-header p {
    margin: 0;
    color: var(--text-color-muted);
}

/* Video Grid Layout */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Video Card Styling */
.video-card {
    background: var(--card-background);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.thumbnail-link {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    background-color: #000;
    position: relative;
    overflow: hidden;
}
.thumbnail-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.video-card:hover .thumbnail-link img {
    transform: scale(1.05);
}

/* Play Icon Overlay */
.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3rem;
    background-color: rgba(0, 0, 0, 0.4);
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}
.video-card:hover .play-icon-overlay {
    opacity: 1;
}

.video-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.video-title {
    font-weight: 600;
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === FIX STARTS HERE === */
/* Corrected Action Buttons Layout */
.video-actions {
    display: flex;
    justify-content: space-between; /* This properly spaces the items */
    align-items: center;
    margin-bottom: 15px;
    padding-top: 5px;
}
.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px; /* Reduced padding for a snug fit */
    border-radius: 8px;
    transition: background-color 0.2s;
    /* The `flex-grow` property that caused the issue has been removed. */
}
.action-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
/* === FIX ENDS HERE === */

.like-btn.liked { color: #ff4757; }

.play-button-main {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: auto;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    box-sizing: border-box; /* Ensures padding is inside the element */
}
.premium-unlock-btn {
    background: var(--secondary-color);
    color: #111;
}
.share-counter {
    background: rgba(0,0,0,0.2);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
    font-weight: bold;
}

/* Bottom Navbar */
.navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background: var(--card-background);
    box-shadow: 0 -2px 5px rgba(0,0,0,0.3);
    border-top: 1px solid var(--border-color);
    display: flex;
    z-index: 100;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-color-muted);
    flex-grow: 1;
    height: 100%;
    background: none;
    border: none;
    font-size: 0.75rem;
}
.nav-item.active, .nav-item:hover { color: var(--primary-color); }
.nav-item i { font-size: 1.4rem; margin-bottom: 4px; }