:root {
    --primary-color: #7c3aed;
    --primary-dark: #6d28d9;
    --secondary-color: #10b981;
    --background-color: #111827;
    --surface-color: #1f2937;
    --text-color: #f3f4f6;
    --text-muted: #9ca3af;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 600px;
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #374151;
}

.welcome-screen {
    display: flex; /* Diubah oleh JS nanti */
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    border-radius: 50%;
}

h1, h2, h3 {
    color: white;
    margin-top: 0;
}

p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Tombol */
.btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease;
    margin-top: 16px;
}

.btn:hover {
    background-color: var(--primary-dark);
}

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

.btn-back {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 16px;
    padding: 0;
}

.btn-copy {
    background-color: #374151;
    color: var(--text-color);
}
.btn-copy:hover {
    background-color: #4b5563;
}

/* Produk */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.product-card {
    background-color: #374151;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.product-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
}

.product-card img {
    width: 100%;
    max-width: 100px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.product-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.product-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.product-card .price {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-top: 12px;
}

/* Form */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    background-color: #374151;
    border: 1px solid #4b5563;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 16px;
    box-sizing: border-box; /* Penting */
}

/* Tab Pembayaran */
.payment-tabs {
    display: flex;
    border-bottom: 1px solid #374151;
    margin-bottom: 20px;
}

.tab-link {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 10px 16px;
    cursor: pointer;
    font-size: 16px;
    border-bottom: 2px solid transparent;
}

.tab-link.active,
.tab-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

/* Area Upload */
#uploadArea {
    border: 2px dashed var(--primary-color);
    background: rgba(124, 58, 237, 0.05);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    margin: 16px 0;
}
#uploadArea:hover {
    background: rgba(124, 58, 237, 0.15);
}

#previewArea img {
    max-width: 100%;
    margin-top: 16px;
    border-radius: 8px;
}
#previewArea button {
    width: auto;
    font-size: 14px;
    padding: 8px 12px;
    margin-top: 10px;
    background-color: #dc2626;
}

#uploadStatus {
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    display: none;
}
#uploadStatus.success { background-color: #059669; color: white; }
#uploadStatus.error { background-color: #dc2626; color: white; }

/* Layar Sukses */
.success-icon {
    font-size: 60px;
    text-align: center;
}
.account-info {
    background-color: #374151;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
}
.account-info p {
    color: var(--text-color);
    font-family: 'Courier New', Courier, monospace;
}

/* Aturan */
.rules-container {
    width: 100%;
    margin-top: 24px;
}
.rules-toggle {
    background-color: #374151;
    color: var(--text-muted);
    width: 100%;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}
.rules-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #374151;
    margin-top: 8px;
    border-radius: 8px;
    padding: 0 16px;
}
.rules-content.open {
    max-height: 300px; /* Atur sesuai kebutuhan */
    padding: 16px;
}

/* Status Pembayaran */
#status {
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin-top: 16px;
    font-weight: 600;
}
#status.success { background-color: var(--secondary-color); color: white; }
#status.expired { background-color: #b91c1c; color: white; }
