/* General Reset & Variables */
:root {
    --bg-dark: #120224;
    --bg-card: #220b3b;
    --bg-card-header: #34125c;
    --primary-color: #ff007f; /* Hot Pink */
    --accent-color: #f7b500; /* Gold */
    --text-white: #ffffff;
    --text-muted: #d0c4de;
    --green-rtp: #20c064;
    --red-rtp: #ff4a5a;
    --border-color: #4a1c7c;
    --font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-family);
    line-height: 1.5;
    padding-bottom: 50px;
    background-image: radial-gradient(circle at top, #2b0554 0%, #120224 70%);
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Area */
header {
    text-align: center;
    padding: 30px 15px 15px 15px;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.logo-text {
    font-size: 2.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to right, #ff007f, #b300ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(255, 0, 127, 0.6));
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logo-text span {
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
}

.crown-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: -5px;
}

.site-title {
    font-size: 1.15rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 10px;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.site-subtitle {
    font-size: 0.95rem;
    color: #e0d0f5;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.datetime-display {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent-color);
    background-color: rgba(0, 0, 0, 0.4);
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid rgba(247, 181, 0, 0.3);
    box-shadow: 0 0 10px rgba(247, 181, 0, 0.1);
}

/* Slider Section (Provider Buttons) */
.provider-slider-outer {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.slider-arrow {
    background-color: var(--accent-color);
    color: #000;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    transition: background-color 0.2s, transform 0.1s;
    z-index: 10;
}

.slider-arrow:hover {
    background-color: #ffd043;
    transform: scale(1.05);
}

.slider-arrow:active {
    transform: scale(0.95);
}

.provider-slider-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    width: 100%;
    padding: 5px 0;
    margin: 0 10px;
    scrollbar-width: none; /* Firefox */
}

.provider-slider-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.provider-btn {
    flex: 0 0 calc(16.666% - 9px); /* 6 providers on desktop */
    min-width: 120px;
    background-color: rgba(20, 4, 40, 0.8);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.provider-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.2);
    transform: translateY(-2px);
}

.provider-btn.active {
    background: linear-gradient(135deg, #a1005b, #45037c);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.5);
}

.provider-btn img, .provider-btn svg {
    height: 30px;
    max-width: 100%;
    object-fit: contain;
}

.provider-name {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Announcement Banner */
.welcome-banner {
    background-color: rgba(34, 11, 59, 0.6);
    border-left: 4px solid var(--primary-color);
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 25px;
    font-size: 0.95rem;
    color: var(--text-white);
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.welcome-banner .announcement-icon {
    font-size: 1.2rem;
    color: var(--accent-color);
    flex-shrink: 0;
}

/* Search Bar Area */
.search-container {
    margin-bottom: 25px;
    display: flex;
    gap: 10px;
}

.search-input {
    flex-grow: 1;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px 20px;
    color: var(--text-white);
    font-size: 1rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.3);
}

.search-btn {
    background: linear-gradient(135deg, #a1005b, #45037c);
    color: var(--text-white);
    border: none;
    border-radius: 6px;
    padding: 0 25px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background-color: #e60072;
}

/* Game Grid Section */
.game-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* Game Card */
.game-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(179, 0, 255, 0.3);
    border-color: #792ebf;
}

.game-img-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Square aspect ratio for covers */
    background-color: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.game-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.game-card:hover .game-img {
    transform: scale(1.08);
}

/* Badge overlay */
.game-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--accent-color), #f77f00);
    color: #000;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    z-index: 2;
}

/* Game Info */
.game-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-title {
    font-size: 0.95rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-white);
}

/* RTP Progress Bar Container */
.rtp-container {
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    height: 24px;
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rtp-bar {
    height: 100%;
    background-image: linear-gradient(to right, #00b09b, #96c93d); /* Default green gradient */
    transition: width 0.8s ease-out;
}

.rtp-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Details Section */
.card-details {
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: rgba(0,0,0,0.25);
    padding: 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    flex-grow: 1;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
}

.detail-item strong {
    color: var(--text-white);
}

.jam-gacor-value {
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    color: var(--text-white);
    margin: 2px 0 6px 0;
    letter-spacing: 0.5px;
}

/* Pola Grid layout inside card */
.pola-container {
    border-top: 1px dashed var(--border-color);
    padding-top: 6px;
    margin-top: 4px;
}

.pola-line {
    font-family: monospace;
    font-size: 0.7rem;
    line-height: 1.4;
    color: #d8cde3;
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.pola-line:last-child {
    margin-bottom: 0;
}

/* Admin floating login button or regular footer */
footer {
    margin-top: 60px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.admin-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: bold;
}

.admin-link:hover {
    background-color: var(--accent-color);
    color: #000;
}


/* Admin Panel Styles */
.admin-navbar {
    background-color: var(--bg-card);
    border-bottom: 2px solid var(--border-color);
    padding: 15px 0;
    margin-bottom: 30px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: #e60072;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.btn-danger {
    background-color: var(--red-rtp);
    color: var(--text-white);
}

.btn-danger:hover {
    background-color: #e03241;
}

.btn-success {
    background-color: var(--green-rtp);
    color: var(--text-white);
}

.btn-success:hover {
    background-color: #1aa655;
}

.btn-accent {
    background-color: var(--accent-color);
    color: #000;
}

.btn-accent:hover {
    background-color: #ffd043;
}

/* Card layout for Admin actions */
.admin-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.admin-card h2 {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    font-size: 1.4rem;
}

/* Responsive Table */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    text-align: left;
}

.admin-table th, .admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.admin-table th {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--accent-color);
    font-weight: bold;
}

.admin-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.admin-table-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Admin Form fields */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 15px;
    color: var(--text-white);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Quick Tools in Admin Pola field */
.pola-tools {
    display: flex;
    gap: 5px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.tool-badge {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-badge:hover {
    background-color: var(--primary-color);
}

/* Alert Boxes */
.alert {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(32, 192, 100, 0.2);
    border: 1px solid var(--green-rtp);
    color: #a3f7c2;
}

.alert-danger {
    background-color: rgba(255, 74, 90, 0.2);
    border: 1px solid var(--red-rtp);
    color: #ffb3b9;
}


/* RESPONSIVE DESIGN BREAKPOINTS */

/* Tablets / Medium Devices (landscape and portrait) */
@media screen and (max-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    .provider-btn {
        flex: 0 0 calc(25% - 8px); /* 4 providers on tablet */
    }
}

/* Small Tablets / Large Mobiles */
@media screen and (max-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .logo-text {
        font-size: 2.2rem;
    }
    
    .site-title {
        font-size: 1rem;
    }
    
    .site-subtitle {
        font-size: 0.85rem;
    }
    
    .provider-btn {
        flex: 0 0 calc(33.333% - 7px); /* 3 providers */
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Mobiles (Portrait) - EXACTLY AS THE IMAGE & FULLY RESPONSIVE */
@media screen and (max-width: 480px) {
    body {
        padding-bottom: 30px;
    }
    
    header {
        padding: 20px 10px 10px 10px;
    }
    
    .logo-text {
        font-size: 1.8rem;
    }
    
    .site-title {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    
    .site-subtitle {
        font-size: 0.75rem;
        margin-bottom: 15px;
    }
    
    .datetime-display {
        font-size: 0.9rem;
        padding: 6px 15px;
    }
    
    .provider-slider-outer {
        padding: 6px;
        margin-bottom: 15px;
    }
    
    .slider-arrow {
        width: 26px;
        height: 26px;
        font-size: 1rem;
    }
    
    .provider-btn {
        flex: 0 0 calc(45% - 5px); /* Let's show ~2.2 items on screen so it hints at scrolling */
        min-width: 100px;
        padding: 8px 4px;
    }
    
    .provider-btn img, .provider-btn svg {
        height: 24px;
    }
    
    .provider-name {
        font-size: 0.65rem;
    }
    
    .welcome-banner {
        padding: 10px 15px;
        font-size: 0.75rem;
        margin-bottom: 15px;
    }
    
    .search-container {
        margin-bottom: 15px;
    }
    
    .search-input {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .search-btn {
        padding: 0 15px;
        font-size: 0.9rem;
    }
    
    /* 2 COLUMNS ON MOBILE - Looks gorgeous, compact, and extremely professional! */
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .game-card {
        border-radius: 8px;
    }
    
    .game-info {
        padding: 8px;
    }
    
    .game-title {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    
    .rtp-container {
        height: 20px;
        margin-bottom: 8px;
    }
    
    .rtp-text {
        font-size: 0.75rem;
    }
    
    .card-details {
        padding: 6px;
        border-radius: 4px;
    }
    
    .jam-gacor-value {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
    
    .pola-line {
        font-size: 0.6rem;
    }
    
    .game-badge {
        font-size: 0.55rem;
        padding: 2px 5px;
        top: 6px;
        left: 6px;
    }
}