:root {
    --primary-red: #d9314d;
    --primary-red-hover: #e6455f;
    --primary-green: #28a745; /* Added green variable */
    --background-dark: #141414;
    --background-light: #212121;
    --background-card: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --border-color: #333333;
    --yellow-team: #ffc400;
}

/* Keyframes for animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(217, 49, 77, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(217, 49, 77, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(217, 49, 77, 0);
    }
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    text-decoration: underline;
    color: var(--text-primary);
}

h1, h2, h3 {
    font-weight: 700;
}

h1 {
    font-size: 2rem;
    margin: 1rem 0;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.btn {
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--text-primary);
}
.btn-primary:hover {
    background-color: var(--primary-red-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}
.btn-secondary:hover {
    background-color: var(--text-primary);
    color: var(--background-dark);
    box-shadow: none;
}

/* Header */
.site-header {
    background-color: var(--background-light);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hamburger-icon {
    cursor: pointer;
}

.logo {
    height: 30px;
}

.live-badge {
    background-color: var(--primary-red);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    animation: pulse 2s infinite;
}

.search-bar {
    position: relative;
    width: 400px;
}

.search-bar input {
    width: 100%;
    background-color: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px 8px 40px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-bar input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(217, 49, 77, 0.5);
}

.search-bar .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    fill: var(--text-secondary);
}

/* Main Content */
main {
    padding: 2rem;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Video Section */
.video-player-mockup {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    overflow: hidden;
}

.video-player-mockup video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Event Details */
.event-details {
    margin-top: 2rem;
    position: relative;
}
.tags span {
    display: inline-block;
    background-color: var(--background-light);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}
.actions {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 1rem;
}
.btn-action {
    background-color: var(--primary-red);
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-action:hover {
    background-color: var(--primary-red-hover);
}

.event-meta { color: var(--text-secondary); }
.event-info-bar { display: flex; justify-content: space-between; align-items: center; }

.event-info-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.viewer-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.viewer-count svg {
    fill: var(--primary-green);
}

#viewer-count-number {
    font-weight: 700;
    color: var(--text-primary);
}


.btn-watch-later { background: none; border: none; color: var(--text-secondary); display: flex; align-items: center; gap: 5px; cursor: pointer; transition: color 0.2s ease, transform 0.2s ease; }
.btn-watch-later:hover { color: var(--text-primary); transform: scale(1.05); }

.published-by { display: flex; align-items: center; gap: 1rem; color: var(--text-secondary); }
.published-by a { color: var(--text-primary); text-decoration: underline; }
.publisher-logo { height: 40px; }

/* Content Carousel */
.content-carousel {
    margin-top: 3rem;
}

.carousel-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem; /* for scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--background-dark);
}

.carousel-container::-webkit-scrollbar {
  height: 8px;
}
.carousel-container::-webkit-scrollbar-track {
  background: var(--background-dark);
}
.carousel-container::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 4px;
}


.video-card {
    flex: 0 0 280px;
    background-color: var(--background-card);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.card-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}
.thumb-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.video-card:hover .thumb-bg {
    transform: scale(1.05);
}

.card-tag-top, .card-tag-bottom {
    position: absolute;
    left: 8px;
    background: rgba(0,0,0,0.7);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}
.card-tag-top { top: 8px; }
.card-tag-bottom { bottom: 8px; }
.highlight { background-color: var(--background-light); }

.card-info {
    padding: 1rem;
}
.card-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}
.video-card:hover h3 {
    color: var(--primary-red);
}

.card-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.card-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 0.5rem;
}

/* CTA Banner */
.cta-banner {
    background-color: var(--background-light);
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 3rem;
    border-radius: 8px;
}
.cta-banner p {
    max-width: 600px;
    margin: 1rem auto;
    color: var(--text-secondary);
}
.cta-banner .btn {
    margin-top: 1rem;
    padding: 12px 24px;
}

/* Styling for the new ad slot */
.ad-slot-320x50 {
    width: 320px;
    height: 50px;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    margin: 2rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Footer */
.site-footer {
    background-color: #111;
    padding: 3rem 2rem;
    margin-top: 3rem;
}
.footer-container { max-width: 1200px; margin: 0 auto; }
.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}
.footer-col-main { flex: 2; }
.logo-footer { height: 35px; margin-bottom: 0.5rem; }
.footer-col-main p { color: var(--text-secondary); font-size: 0.9rem; }
.social-links { display: flex; gap: 1rem; margin-top: 1.5rem; }
.social-links a {
    transition: transform 0.2s ease;
}
.social-links a:hover {
    transform: scale(1.2);
}

.footer-col { flex: 1; }
.footer-col h4 { margin-bottom: 1rem; }
.footer-col a { display: block; margin-bottom: 0.75rem; color: var(--text-secondary); }
.footer-col a:hover { color: var(--text-primary); text-decoration: none;}
.footer-divider { margin: 2rem 0; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.footer-legal a { margin-left: 1.5rem; }
.footer-legal a:hover { color: var(--text-primary); }

/* Help Button */
.help-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--background-light);
    color: white;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    z-index: 1001;
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.help-button:hover {
    transform: translateY(-2px);
    background-color: #333;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s linear;
}

.popup-overlay.active {
    visibility: visible;
    opacity: 1;
}

.popup-content {
    background-color: var(--background-card);
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    color: var(--text-primary);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

.popup-content h2 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.popup-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.popup-close-btn:hover {
    color: var(--text-primary);
}

/* Perbaikan untuk menghilangkan garis bawah pada tombol saat dihover */
.btn:hover,
a.btn:hover {
    text-decoration: none;
}

/* Styling for the ad slot */
.ad-container {
    text-align: center;
    margin-bottom: 2rem;
    padding-top: 2rem;
}

.ad-image {
    max-width: 100%;
    height: auto;
}

/* ========================================= */
/* Penyesuaian Responsif untuk Perangkat Seluler */
/* ========================================= */
@media (max-width: 768px) {
    /* Main container and padding */
    body {
        font-size: 14px;
    }
    main {
        padding: 1rem;
    }

    .main-container {
        padding: 0;
    }

    h1 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* Header adjustments for mobile */
    .site-header {
        padding: 0 1rem;
    }
    .header-left {
        gap: 0.5rem;
    }
    .main-nav,
    .search-bar,
    .header-right .btn-primary {
        display: none; /* Hide non-essential elements on mobile */
    }

    /* Keep hamburger and logo on left, login on right */
    .header-container {
        justify-content: space-between;
    }

    .header-right {
        gap: 0.5rem;
    }

    /* Event details adjustments */
    .event-details {
        margin-top: 1rem;
    }
    .actions {
        position: static;
        margin-top: 1rem;
    }
    .event-info-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .event-info-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    /* Footer adjustments for mobile */
    .footer-top {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-col-main,
    .footer-col {
        flex: auto; /* Allow columns to stack */
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-legal a {
        margin-left: 0;
        margin-right: 1rem; /* Add some space between legal links */
    }
    
    /* Make the help button more prominent on mobile */
    .help-button {
      padding: 12px;
      border-radius: 50%;
      right: 15px;
      bottom: 15px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    }
    
    .help-button span {
      display: none;
    }

    .ad-container {
        margin-bottom: 1rem;
        padding-top: 1rem;
    }

    /* Styling for the new ad slot */
    .ad-slot-320x50 {
        width: 100%;
        margin: 1rem auto;
        height: 50px;
        max-width: 320px;
    }
}