* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Poppins;
}

body {
    background-color: #ebebeb;
    color: #333;
}

/* Desktop max-width constraint */
.container,
.header,
.banner {
    max-width: 480px;
    margin: 0 auto;
}

/* Header */
.header {
    background: linear-gradient(135deg, #000000 0%, #5c4e15 100%);
    padding: 5px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo img {
    height: 50px;
    max-width: 200px;
    object-fit: contain;
}

.livechat-btn {
    background: linear-gradient(to right top, #b88400, #e7bf0e, #ffee5f, #e7bf0e, #b88400);
    color: black;
    border: 1px solid gold;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.livechat-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Banner */
.banner {
    width: 100%;
    overflow: hidden;
}

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

/* Container */
.container {
    padding: 20px;
}

/* Lottery Navigation */
.lottery-nav {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 20px;
    padding-top: 0px;
    -webkit-overflow-scrolling: touch;
}

.lottery-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    min-width: 85px;
    padding: 15px 10px;
    background: white;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid #00000020;
}

.nav-item.active {
    border: 1px solid #756400;;
    background: linear-gradient(to right top, #b88400, #e7bf0e, #ffee5f, #e7bf0e, #b88400);
    color: black;
}

.nav-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 5px;
}

.nav-item span {
    display: block;
    font-size: 12px;
    font-weight: 500;
}

/* Date Display */
.date-display {
    background: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.date-display span {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Lucky Button */
.lucky-btn {
    width: 100%;
    background: linear-gradient(to right top, #b88400, #eebf18, #ffee5f, #e7bf0e, #b88400);
    color: black;
    border: 1px solid gold;
    padding: 10px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 20px;
    box-shadow: inset 0px 0px 0px 1px rgb(255 247 0), inset 0px 2px 0px 0px rgb(255 225 0), inset 0px 0px 0px 2px rgb(255 249 0), 3px 3px 3px 1px rgb(0 0 0 / 20%);
    transition: transform 0.2s ease;
}

.lucky-btn:hover {
    transform: translateY(-2px);
}

/* Search Bar */
.search-container {
    margin-bottom: 20px;
}

.grubsearchPasaran {
    width: 100%; 
    padding: 5px 10px; 
    display: flex; 
    align-items: center; 
    margin-bottom: 10px; 
    border-radius: 6px; 
    background: linear-gradient(to right top, #ffb500, #c39900, #ffee5f, #ab8c00, #ffbc00); 
    border: 1px solid #ffcf00 !important; 
    box-shadow: inset 0px 0px 0px 1px rgb(255 247 0), inset 0px 2px 0px 0px rgb(255 225 0), inset 0px 0px 0px 2px rgb(255 249 0), 3px 3px 3px 1px rgb(0 0 0 / 20%); 
    position: relative;
}

.grubsearchPasaran input {
    width: 100%; 
    border: none; 
    border-radius: 3px; 
    padding: 5px; 
    color: #ffffff; 
    letter-spacing: 1px; 
    background: #2b2b2b; 
    box-shadow: none;
    outline: none;
    font-size: 14px;
}

.grubsearchPasaran img {
    width: 28px; 
    margin-right: 5px; 
    filter: brightness(10) drop-shadow(1px 2px 2px #00000054) contrast(1);
}

.grubsearchPasaran input::placeholder {
    color: #b3bfc5;
}

/* Cards Container */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lottery-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.lottery-card:hover {
    transform: translateY(-4px);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    color: black;
    text-align: center;
}

.card-header h3 {
    margin-bottom: 10px;
    font-size: 15px;
    background: linear-gradient(to right top, #b88400, #e7bf0e, #ffee5f, #e7bf0e, #b88400);
    border: 1px solid gold;
    box-shadow: inset 0px 0px 0px 1px rgb(255 247 0), inset 0px 2px 0px 0px rgb(255 225 0), inset 0px 0px 0px 2px rgb(255 249 0), 3px 3px 3px 1px rgb(0 0 0 / 20%);
    border-radius: 8px;
    padding: 10px 5px;
    margin-left: 50px;
    margin-right: 50px;
    font-weight: 100;
}

.card-header img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
}

.card-content {
    padding: 20px;
}

.prediction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.prediction-row:last-child {
    border-bottom: none;
}

.prediction-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.prediction-value {
    color: #667eea;
    font-size: 14px;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.number-set {
    display: flex;
    gap: 3px;
    align-items: center;
}

.number-row {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    align-items: center;
}

.main-number {
    font-size: 24px !important;
    color: #f5576c;
    letter-spacing: 2px;
    display: flex;
    justify-content: flex-end;
}

.main-number .ball {
    font-size: 18px !important;
}

.colok-number {
    font-size: 20px !important;
    color: #4CAF50;
    display: flex;
    justify-content: flex-end;
}

/* Ball styling for all numbers */
.ball {
    width: 35px;
    height: 35px;
    background: radial-gradient(circle at 65% 15%, white 1px, orange 3%, darkred 60%, #fc0 100%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Different colors for different types */
.ball.main {
    background: radial-gradient(circle at 65% 15%, white 1px, #ff6b35 3%, #8B0000 60%, #FFD700 100%);
}

.ball.combo {
    background: radial-gradient(circle at 65% 15%, white 1px, #4169E1 3%, #191970 60%, #87CEEB 100%);
}

.ball.colok {
    background: radial-gradient(circle at 65% 15%, white 1px, #32CD32 3%, #006400 60%, #98FB98 100%);
}

/* Toto Macau Time Slots */
.time-slots {
    padding: 20px 0;
}

.time-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
}

.time-btn {
    background: linear-gradient(to right top, #b88400, #e7bf0e, #ffee5f, #e7bf0e, #b88400);
    color: black;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0px 0px 0px 1px rgb(255 247 0), inset 0px 2px 0px 0px rgb(255 225 0), inset 0px 0px 0px 2px rgb(255 249 0), 3px 3px 3px 1px rgb(0 0 0 / 20%);
    border: 1px solid gold;
    min-width: 80px;
}

.time-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 102, 102, 0.4);
}

.time-btn.active {
    background: linear-gradient(135deg, #081376 0%, #0084ff 100%);
    box-shadow: 0px 0px 0px 2px #00ff1f;
    color: white;
}

.macau-prediction {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.selected-time h4 {
    text-align: center;
    color: black;
    margin-bottom: 20px;
    font-size: 18px;
}

/* Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-overlay.active {
    display: flex;
}

.popup {
    background: white;
    border-radius: 20px;
    max-width: 300px;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.popup-header {
    background: linear-gradient(to right top, #b88400, #e7bf0e, #ffee5f, #e7bf0e, #b88400);
    padding: 20px;
    color: black    ;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h3 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: red;
    font-size: 27px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.popup-content {
    padding: 30px 20px;
    text-align: center;
}

.lucky-number {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.lucky-number .ball {
    width: 45px;
    height: 45px;
    font-size: 20px;
    background: radial-gradient(circle at 65% 15%, white 1px, #f093fb 3%, #8B0066 60%, #f5576c 100%);
}

.popup-content p {
    margin-bottom: 20px;
    color: #666;
}

.generate-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 15px;
        margin-top: 0px;
    }
    
    .header {
        max-width: 100%;
    }
    
    .banner {
        max-width: 100%;
    }
    
    .nav-item {
        min-width: 80px;
        padding: 12px 8px;
    }
    
    .nav-item img {
        width: 35px;
        height: 35px;
    }
    
    .nav-item span {
        font-size: 11px;
    }
}

/* Hide scrollbar for webkit browsers */
.lottery-nav {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.lottery-nav::-webkit-scrollbar {
    width: 0;
    height: 0;
}
