/* File: assets/css/style.css */
:root {
    --primary-color: #1a1a2e;
    --accent-color: #00adb5;
    --light-color: #f8f9fa;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #16213e 100%);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.logo i {
    color: var(--accent-color);
    margin-right: 8px;
}

.logo span {
    color: var(--accent-color);
}

.btn-daftar {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 500;
}

.btn-login {
    background-color: transparent;
    color: white;
    border: 1px solid var(--accent-color);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 500;
}

/* Hero Section */
.hero-slider {
    background: linear-gradient(135deg, var(--primary-color) 0%, #16213e 100%);
    color: white;
    padding: 50px 0;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* Category Cards */
.category-section {
    padding: 60px 0;
}

.section-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 10px auto;
}

.category-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-10px);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-color), #009199);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
}

.card-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.card-text {
    color: #6c757d;
    font-size: 0.95rem;
}

/* Promo Banner */
.promo-banner {
    background: linear-gradient(135deg, #0f3460, var(--primary-color));
    color: white;
    padding: 60px 0;
}

.promo-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.promo-text {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Featured Games */
.featured-section {
    padding: 60px 0;
    background-color: var(--light-color);
}

.game-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
}

.game-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.game-overlay {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-weight: 600;
}

.game-info {
    padding: 20px;
}

.game-info h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.game-rtp {
    color: var(--accent-color);
    font-weight: 600;
}

.btn-play {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    width: 100%;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-play:hover {
    background-color: #009199;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0 30px;
}

.footer h5 {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 20px;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.social-icons a:hover {
    background: var(--accent-color);
}

.payment-methods {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .promo-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===== MOBILE OPTIMIZATION ===== */

/* Touch targets minimum 44x44px */
.btn, .nav-link, .game-card a {
    min-height: 44px;
    min-width: 44px;
}

/* Better scrolling on mobile */
body {
    -webkit-overflow-scrolling: touch;
}

/* Prevent text size adjustment on orientation change */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Mobile viewport fixes */
@media (max-width: 768px) {
    /* Remove padding/margin that's too big for mobile */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Better font sizes for mobile */
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    .display-4 { font-size: 2rem !important; }
    .display-5 { font-size: 1.75rem !important; }
    
    /* Reduce button sizes */
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    /* Stack columns vertically */
    .row {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    .col-md-4, .col-md-6, .col-lg-3, .col-lg-4, .col-lg-6, .col-lg-8 {
        padding-left: 8px;
        padding-right: 8px;
        margin-bottom: 16px;
    }
    
    /* Optimize game cards for mobile */
    .game-card {
        margin-bottom: 1rem;
    }
    
    .game-image img {
        height: 150px !important;
    }
    
    /* Better spacing */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }
    
    /* Mobile-friendly forms */
    input, select, textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    /* Fix mobile menu padding */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
}

/* Very small devices */
@media (max-width: 576px) {
    /* Single column layout */
    .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Full width buttons */
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Reduce padding more */
    .p-4, .p-5 {
        padding: 1rem !important;
    }
    
    /* Hide less important elements */
    .d-none-mobile {
        display: none !important;
    }
    
    /* Smaller badges */
    .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Tablet optimization */
@media (min-width: 577px) and (max-width: 768px) {
    /* 2 columns for tablets */
    .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Prevent horizontal scroll */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Touch-friendly hover states */
@media (hover: none) and (pointer: coarse) {
    .hover-lift:hover {
        transform: none !important;
    }
    
    .game-card:hover {
        transform: none !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    }
}

/* Safe area for notched phones */
@supports(padding: max(0px)) {
    .container, .mobile-nav {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}