/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: #0b0b13;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    padding-top: 90px;
}

header {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

header h1 {
    font-size: 2.5rem;
    line-height: 1.1;
}

header h1 span {
    color: #00ffcc;
}

header p {
    color: hsl(0, 0%, 90%);
    font-size: 0.9rem;
    font-weight: bold;
}

/* Generator Card Styling */
.generator-card {
    background: #161625;
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(0, 255, 204, 0.08),
        0 0 25px rgba(0, 153, 255, 0.08) inset;
    border: 1px solid rgba(0, 255, 204, 0.2);
}


.selection-box {
    margin-bottom: 25px;
}

.selection-box label {
    display: block;
    margin-bottom: 8px;
    /* jarak antara label dan select */
}

select {
    background: #1f1f33;
    color: white;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 8px;
    outline: none;
    width: 80%;
}

/* Display Balls Area */
.display-area {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.ball {
    width: 65px;
    height: 65px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #b4b4b4);
    color: #111;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 255, 204, 0.2);
    transition: transform 0.2s;
}

/* Animation rolling */
.rolling {
    animation: bounce 0.1s infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-10px);
    }
}

/* Button Styling */
.btn-generate {
    background: linear-gradient(135deg, #00ffcc, #0099ff);
    color: #000;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
}

.btn-generate:hover {
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.6);
    transform: scale(1.05);
}

.disclaimer {
    margin-top: 20px;
    font-size: 0.8rem;
    color: hsl(0, 0%, 70%);
    font-weight: bold;
}


/* CSS Untuk Tombol Bawah */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.action-buttons .btn {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 20px;
    font-weight: bold;
    text-decoration: none;
    color: #000;
    background: linear-gradient(135deg, #00ffcc, #0099ff);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform .2s ease, box-shadow .2s ease;
    text-transform: uppercase;
}

.action-buttons .btn:hover {
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.6);
    transform: scale(1.05);
}


/* Logo Pasaran */
.logo-pasaran {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;   /* ⬅️ INI KUNCINYA */
    text-align: center;    /* ⬅️ biar teks rapi */
}

.logo-pasaran img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.logo-item span {
    margin-top: 6px;
    font-weight: bold;
    font-size: 0.8rem;
    color: hsl(0, 0%, 80%);
}

@media (max-width: 600px) {
    .logo-pasaran {
        grid-template-columns: repeat(2, 1fr);
    }
}

.btn-generate {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    color: #000;
    background: linear-gradient(135deg, #00ffcc, #0099ff);
    box-shadow: 0 5px 15px rgba(0,0,0,.3);
}

.btn-generate:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* POPUP */
.popup {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 9999;
}

.popup-content {
    background: #111;
    color: #fff;
    max-width: 360px;
    margin: 20vh auto;
    padding: 20px;
    border-radius: 14px;
    text-align: center;
}

.popup-content h3 {
    margin-bottom: 10px;
}

.popup-content p {
    font-size: 14px;
    margin-bottom: 15px;
    color: #ccc;
}

.popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
}

.popup-login {
    padding: 8px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #00ffcc, #0099ff);
    color: #000;
    text-decoration: none;
    font-weight: bold;
}

.popup-close {
    padding: 8px 14px;
    border-radius: 10px;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
}

.history-box {
    margin: 15px 0;
    padding: 10px;
    background: #1b1b1b;
    border-radius: 10px;
}

.history-box h4 {
    font-size: 14px;
    margin-bottom: 8px;
    color: #00ffcc;
}

#generate-history {
    list-style: none;
    padding: 0;
    margin: 0;
}

#generate-history li {
    font-size: 13px;
    padding: 4px 0;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

#generate-history li:last-child {
    border-bottom: none;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.history-table thead {
    background: rgba(255,255,255,0.05);
}

.history-table th {
    padding: 6px 8px;
    font-size: 12px;
    text-transform: uppercase;
    color: #00ffcc;
    border-bottom: 1px solid rgba(255,255,255,.15);
}

.history-table td {
    padding: 6px 8px;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.history-table td:nth-child(1) {
    width: 30px;
    text-align: center;
    color: #aaa;
}

.history-table td:nth-child(2) {
    text-align: center;
    letter-spacing: 1px;
    color: #fff;
}

.history-table td:nth-child(3) {
    text-align: right;
    font-size: 12px;
    color: #bbb;
}

.history-table th:nth-child(3) {
    text-align: right;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.popup-note {
    margin-top: 10px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #aaa;
    text-align: center;
    font-style: italic;
}