* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-left {
    flex: 1;
    text-align: left;
}

.header-right {
    display: flex;
    align-items: center;
}

header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 4em;
    height: 4em;
    vertical-align: middle;
    object-fit: contain;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 0;
    font-weight: 500;
}

#liveClock {
    color: #667eea;
    font-weight: 600;
}

.timezone {
    font-size: 0.85em;
    color: #999;
    font-weight: 400;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 12px;
}

.btn-daftar,
.btn-login {
    padding: 12px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.btn-daftar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid transparent;
}

.btn-daftar:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-login {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-login:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.last-update {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.last-update span {
    color: #666;
    font-size: 0.9em;
}

#refreshBtn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

#refreshBtn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tab-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Result Card */
.result-card {
    background: white;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    padding: 20px 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.8em;
}

.draw-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    font-size: 0.9em;
}

.card-header.damacai {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.card-header.magnum {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.card-header.toto {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.card-header.singapore {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.card-header.sabah {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

/* Prizes */
.prizes {
    padding: 30px;
}

.main-prizes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.prize {
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.prize .label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    font-weight: bold;
}

.prize .number {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.prize.first {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #c17c00;
}

.prize.second {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #666;
}

.prize.third {
    background: linear-gradient(135deg, #cd7f32 0%, #e6a857 100%);
    color: #8b4513;
}

.special-prizes,
.consolation-prizes {
    margin-bottom: 20px;
}

.special-prizes h3,
.consolation-prizes h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.numbers-grid span {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
    word-break: break-all;
    overflow: hidden;
}

.numbers-grid span:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

/* Footer */
footer {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

footer p {
    margin: 5px 0;
    color: #666;
}

footer .copyright {
    font-size: 0.85em;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .header-left {
        text-align: center;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
    }
    
    .cta-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .btn-daftar,
    .btn-login {
        flex: 1;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.95em;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .draw-info {
        align-items: center;
    }
    
    .main-prizes {
        grid-template-columns: 1fr;
    }
    
        gap: 8px;
    }
    
    .numbers-grid span {
        padding: 10px 5px;
        font-size: 1em;
        border-radius: 6px;
    }
    
    .prize .number {
        font-size: 1.8em;
    }
    
    .prize {
        padding: 15px;
    }
    
    .special-prizes h3,
    .consolation-prizes h3 {
        font-size: 1.1em;
        margin-bottom: 12px;
    }
.prize .number {
        font-size: 2em;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
    position: relative;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.modal-subtitle {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95em;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #667eea;
    background: #f0f0f0;
    transform: rotate(90deg);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal !important;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label a {
    color: #667eea;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.modal-footer {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.modal-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        padding: 30px 25px;
        width: 95%;
    }
    
    .modal-content h2 {
        font-size: 1.5em;
    }
}
