/* 
Project: Ramalan Lotto Full-Stack
Theme: Premium Dark & Gold (Final Integrated Version)
*/

/* --- 1. GLOBAL SETTINGS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    height: 100%;
}

body {
    background-color: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* --- 2. HEADER & NAVIGATION --- */
.main-header {
    background: #ffcc00;
    height: 60px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrapper {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px; 
}

.site-logo { height: 35px; width: auto; }

.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-menu ul li a {
    text-decoration: none;
    color: #000;
    font-weight: bold;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: 0.3s;
}

.nav-menu ul li a:hover {
    background: #fff;
}

/* --- 3. MAIN CONTENT AREA --- */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: #262626;
    border-radius: 15px;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    flex: 1 0 auto;
}

h1 { color: #ffcc00; margin-bottom: 15px; }

/* --- 4. LUCKY NUMBER SECTION --- */
.lucky-section { text-align: center; margin-bottom: 50px; }
.lucky-card {
    background: linear-gradient(145deg, #333, #111);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid #ffcc00;
    display: inline-block;
    min-width: 300px;
}

.number-display { display: flex; justify-content: center; gap: 15px; margin-bottom: 25px; }
.number-display span {
    background: #ffcc00;
    color: #000;
    font-size: 32px;
    font-weight: bold;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

/* --- 5. LOTTO GRID (Home & Archive) --- */
.lotto-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
    margin-top: 30px;
}

.lotto-card {
    background: #333;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #444;
    transition: 0.3s;
}

.lotto-card:hover { transform: translateY(-10px); border-color: #ffcc00; }
.lotto-card img { width: 100px; height: 100px; object-fit: contain; margin-bottom: 15px; }

.view-btn {
    display: inline-block;
    background: #ffcc00;
    color: #000;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: bold;
}

.site-footer {
    background: #000;
    padding: 10px 0; 
    border-top: 2px solid #ffcc00;
    width: 100%;
    flex-shrink: 0;
}

.footer-container {
    width: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    position: relative;
}

.footer-logo { height: 30px; width: auto; opacity: 0.8; }

.footer-center {
    color: #888;
    font-size: 13px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.footer-nav ul { list-style: none; display: flex; gap: 20px; }
.footer-nav ul li a { text-decoration: none; color: #ffcc00; font-size: 12px; transition: 0.3s; }
.footer-nav ul li a:hover { color: #fff; text-decoration: underline; }

/* --- 6. HOME PAGE SPECIFIC --- */
.home-container {
    display: flex;
    gap: 30px;
    width: 100%;       
    max-width: none;   
    margin: 40px 0;   
    padding: 0 40px;   
}

.home-main-content {
    flex: 3;
    background: #262626;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.home-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
    align-self: flex-start;
}

.home-lotto-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px; 
    width: 100%;
}

/* --- 7. BUTTONS & ANIMATIONS --- */
.generate-btn {
    width: 100%;
    padding: 12px;
    background: #ffcc00;
    color: #000; 
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.generate-btn:hover { background: #ffffff; color: #000; }

@keyframes welcomeFade {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.welcome-msg {
    text-align: center;
    color: #ffcc00;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    animation: welcomeFade 2s ease-in-out infinite alternate;
}

.legal-page-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px 20px;
    background: #262626;
    border-radius: 15px;
    border: 1px solid #333;
    line-height: 1.8;
    color: #ddd;
}

/* --- 8. MOBILE NAVIGATION BUTTON --- */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: #000;
    border-radius: 2px;
}

/* --- 9. FINAL RESPONSIVE FIXES (INTEGRATED) --- */
@media (max-width: 992px) {
    .mobile-menu-btn { display: flex; }

    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #ffcc00;
        padding: 20px 40px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.2);
        z-index: 1001;
    }

    .nav-menu.active { display: block; }

    .nav-menu ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    /* Menu Borders Fix */
    .nav-menu ul li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1); 
    }

    .nav-menu ul li:last-child { border-bottom: none; }

    .nav-menu ul li a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 15px 0;
        font-size: 16px;
    }

    /* Universal Grid Fix for Mobile[cite: 1] */
    .home-lotto-grid, .archive-grid, .lotto-grid { 
        grid-template-columns: 1fr !important; 
        width: 100% !important;
    }

    .home-container { flex-direction: column; padding: 0 20px; }
    
    .footer-container { 
        flex-direction: column; 
        text-align: center; 
        gap: 15px; 
    }
    .footer-center { position: static; transform: none; }

    /* Home Page "View Chart" Overlap Fix[cite: 1] */
    .lotto-card h3 {
        margin-bottom: 15px !important;
        padding-bottom: 5px;
    }

    /* Premium Card & Download Button Fix[cite: 1] */
    .premium-card {
        width: 95% !important;
        padding: 25px 15px !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column;
        align-items: center;
    }

    .chart-grid {
        width: 100% !important;
        max-width: 320px !important;
        gap: 8px !important;
    }

    .num-cell { height: 60px !important; }
    .num-cell span { font-size: 34px !important; }

    /* Button Positioning Fix[cite: 1] */
    main[style*="text-align: center;"] .view-btn {
        margin-top: 25px !important; 
        width: 100% !important;
        max-width: 300px;
        display: inline-block !important;
    }
}

@media (max-width: 600px) {
    .num-cell { height: 50px !important; }
    .num-cell span { font-size: 28px !important; }
    .number-display span { width: 50px; height: 50px; font-size: 24px; }
}