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

body {
    font-family: 'Arial', sans-serif;
    background-color: #1a1a1a;
    color: #f5f5f5;
    line-height: 1.6;
}

/* Header Styles */
header {
    background-color: #0f0f0f;
    text-align: center;
}

.logo-container {
    padding: 1.5rem 1rem;
    margin-bottom: 0;
    background-color: #1a1a1a;
    border-bottom: 2px solid #333;
    position: relative;
}

.logo-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #555, transparent);
}

.logo {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Banner Container - Desktop */
.banner-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #222;
    max-width: 1200px;
    margin: 1rem auto 0;
    padding: 0 1.5rem;
}

.banner-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 22.42%;
    overflow: hidden;
    border-radius: 10px;
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    border: 2px solid #333;
}

.banner.desktop {
    display: block;
}

.banner-mobile-container {
    display: none;
}

/* Media queries untuk mobile */
@media (max-width: 768px) {
    .logo-container {
        padding: 1rem;
        background-color: #1a1a1a;
        border-bottom: 1px solid #333;
    }
    
    .banner-container {
        display: none;
    }
    
    .banner-mobile-container {
        display: block;
        width: 100%;
        max-width: 720px;
        margin: 1rem auto 0;
        position: relative;
        overflow: hidden;
        background-color: #222;
        padding: 0 1rem;
    }
    
    .banner-mobile-wrapper {
        position: relative;
        width: 100%;
        height: 0;
        padding-top: 50%;
        overflow: hidden;
        border-radius: 10px;
        margin: 1rem 0;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    
    .banner-mobile {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: 10px;
        border: 2px solid #333;
    }
}

/* Responsive adjustments untuk banner desktop */
@media (max-width: 1200px) {
    .banner-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .banner-wrapper {
        padding-top: 25%;
    }
}

@media (min-width: 993px) and (max-width: 1200px) {
    .banner-wrapper {
        padding-top: 23.5%;
    }
}

/* Hover effect untuk banner */
.banner-wrapper:hover .banner {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.banner-wrapper:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.3s ease;
}

/* Main Content */
main {
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: #ffc60a;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(255, 51, 51, 0.3);
}

/* Schedule Info */
.schedule-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #222;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    border: 1px solid #333;
}

.last-update {
    color: #aaa;
    font-size: 0.9rem;
}

.schedule-times {
    display: flex;
    gap: 1rem;
}

.schedule-time {
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    background-color: #2a2a2a;
}

.schedule-time.morning {
    border-left: 3px solid #ffcc33;
}

.schedule-time.evening {
    border-left: 3px solid #3399ff;
}

/* TAB NAVIGASI */
.tabs-container {
    display: flex;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    margin: 20px 0;
}

.tabs {
    display: inline-flex;
    overflow-x: auto;
    background-color: #222;
    border-radius: 10px;
    border: 1px solid #333;
    max-width: 100%;
    margin: 0 auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ffcc33 #222;
}

.tabs::-webkit-scrollbar {
    height: 4px;
}

.tabs::-webkit-scrollbar-thumb {
    background-color: #ffcc33;
    border-radius: 4px;
}

.tabs::-webkit-scrollbar-track {
    background-color: #222;
}

.tab-button {
    padding: 12px 20px;
    background: none;
    border: none;
    color: #f5f5f5;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    position: relative;
}

.tab-button:hover {
    background-color: #2a2a2a;
}

.tab-button.active {
    color: #ffcc33;
    font-weight: bold;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 3px;
    background-color: #ffcc33;
    border-radius: 3px 3px 0 0;
}

/* Winners Container */
.winners-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.date-section {
    background-color: #222;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    display: none;
}

.date-section.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.date-section h2 {
    color: #fff533;
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
    text-align: center;
}

.release-times {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.release-time {
    display: inline-block;
}

.time-label {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}

.time-label.morning {
    background-color: rgba(255, 204, 51, 0.2);
    color: #ffcc33;
    border: 1px solid #ffcc33;
}

.time-label.evening {
    background-color: rgba(51, 153, 255, 0.2);
    color: #3399ff;
    border: 1px solid #3399ff;
}

/* Tab pagi/sore */
.winners-time-tabs {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 10px;
}

.time-tab-button {
    padding: 10px 20px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #f5f5f5;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-tab-button:hover {
    background-color: #333;
}

.time-tab-button.active {
    background-color: #ff3333;
    color: #fff;
    border-color: #ff3333;
}

.time-winners {
    display: none;
}

.time-winners.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

.winners-section {
    margin-bottom: 1.5rem;
}

.winners-section h3 {
    color: #ffcc33;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.winner-counter {
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #aaa;
}

.winner-counter strong {
    color: #d4a712;
}

/* PERBAIKAN UTAMA: Winners Grid - 5 kolom untuk desktop */
.winners-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 kolom tetap untuk desktop */
    gap: 0.8rem;
    margin: 0 auto;
    max-width: 100%;
}

.winner-card {
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 0.8rem;
    text-align: center;
    border: 1px solid #444;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.winner-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 51, 51, 0.2);
    border-color: #ceca05;
}

.winner-number {
    position: absolute;
    top: 5px;
    left: 8px;
    font-size: 0.7rem;
    color: #fff533;
    font-weight: bold;
}

.winner-id {
    font-weight: bold;
    font-size: 0.9rem; /* Kecilkan sedikit untuk 5 kolom */
    color: #fff;
    font-family: 'Consolas', monospace;
    letter-spacing: 1px;
    word-break: break-all; /* Pecah kata panjang */
}

.no-winners {
    text-align: center;
    padding: 30px;
    color: #aaa;
    font-style: italic;
}

.alert-notice {
    background-color: rgba(255, 87, 34, 0.1);
    border-left: 4px solid #ff5722;
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-notice i {
    color: #ff5722;
    font-size: 1.4rem;
}

/* Announcement */
.announcement {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid #444;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.announcement h3 {
    color: #ffcc33;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-align: center;
}

.announcement p {
    margin-bottom: 1rem;
    color: #ddd;
}

.announcement ul {
    margin: 1rem 0;
    padding-left: 2rem;
    color: #ddd;
}

.announcement li {
    margin-bottom: 0.5rem;
}

.time {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}

.time.morning {
    background-color: rgba(255, 204, 51, 0.2);
    color: #ffcc33;
}

.time.evening {
    background-color: rgba(51, 153, 255, 0.2);
    color: #3399ff;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #ffcc33;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
}

/* Footer */
footer {
    background-color: #0f0f0f;
    padding: 1.5rem;
    text-align: center;
    margin-top: 2rem;
    border-top: 3px solid #ffcc33;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-content p {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Live chat container styling */
#chat-widget-container {
    bottom: 20px !important;
    right: 20px !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .banner-wrapper {
        padding-top: 35%;
    }
    
    /* Tetap 5 kolom untuk desktop kecil */
    .winners-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.6rem;
    }
    
    .winner-id {
        font-size: 0.85rem;
    }
}

@media (max-width: 992px) {
    .banner-wrapper {
        padding-top: 40%;
    }
    
    /* 4 kolom untuk tablet */
    .winners-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.6rem;
    }
}

@media (max-width: 768px) {
    .schedule-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    /* PERBAIKAN UTAMA: 2 kolom untuk mobile */
    .winners-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 kolom tetap untuk mobile */
        gap: 0.8rem;
    }
    
    .winner-card {
        padding: 1rem; /* Padding lebih besar di mobile */
        min-height: 70px;
    }
    
    .winner-id {
        font-size: 0.9rem; /* Font lebih besar di mobile untuk 2 kolom */
    }
    
    .date-section {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .date-section h2 {
        font-size: 1.3rem;
    }
    
    .winners-section h3 {
        font-size: 1.1rem;
    }
    
    .banner-wrapper {
        padding-top: 50%;
    }
    
    .winners-time-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .banner-wrapper {
        padding-top: 60%;
    }
    
    /* Tetap 2 kolom untuk mobile kecil */
    .winners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
}

@media (max-width: 480px) {
    /* Tetap 2 kolom untuk mobile sangat kecil */
    .winners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .winner-card {
        padding: 0.8rem;
    }
    
    .date-section {
        padding: 0.8rem;
    }
    
    h1 {
        font-size: 1.4rem;
    }
    
    .winner-id {
        font-size: 0.85rem;
    }
    
    .schedule-times {
        flex-direction: column;
        gap: 0.5rem;
    }
}