/**
 * NexusGGR Premium Gaming Theme CSS
 * Architecture: Mobile-First Responsive Design & Glassmorphism UI
 * @package NexusGGR_Topup
 * @version 1.0.0 (2026)
 */

/* ==========================================================================
   1. CORE VARIABLES & RESET
   ========================================================================== */
:root {
    --bg-main: #070a0f;
    --bg-card: rgba(18, 24, 36, 0.85);
    --bg-input: #0b1017;
    --primary-neon: #00ff66;
    --primary-neon-glow: rgba(0, 255, 102, 0.35);
    --primary-neon-hover: #00d455;
    --text-white: #ffffff;
    --text-grey: #8b9bb4;
    --border-color: #1f2a3f;
    --danger-color: #ff3333;
    --danger-glow: rgba(255, 51, 51, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    overflow-x: hidden;
    position: relative;
}

/* Background Tech Decorative Grid Effect */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(31, 42, 63, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 42, 63, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
}

/* ==========================================================================
   2. SPA LAYERING ENGINE (VIEWS CONTROL)
   ========================================================================== */
.spa-view {
    display: none;
    opacity: 0;
    transform: translateY(15px) scale(0.98);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.spa-view.active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ==========================================================================
   3. PREMIUM CARD GRAPHICS (GLASSMORPHISM)
   ========================================================================== */
.gaming-container {
    width: 100%;
    max-width: 480px;
    z-index: 10;
}

.gaming-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 
                0 0 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* Top Neon Line Accent */
.gaming-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-neon), transparent);
}

.card-header {
    text-align: center;
    margin-bottom: 25px;
}

.card-header h2, .card-header h3 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

/* ==========================================================================
   4. FORM FIELDS & INPUT STYLING
   ========================================================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

input[type="text"], 
input[type="number"], 
textarea, 
.gaming-select {
    width: 100%;
    padding: 14px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-white);
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    -webkit-appearance: none;
    appearance: none;
}

/* Custom indicator for dropdown */
.gaming-select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b9bb4' viewBox='0 0 16 16'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
    cursor: pointer;
}

input:focus, 
textarea:focus, 
.gaming-select:focus {
    outline: none;
    border-color: var(--primary-neon);
    box-shadow: 0 0 12px var(--primary-neon-glow);
    background-color: #0d1622;
}

textarea {
    resize: none;
}

/* Hide input number arrows */
input[::-webkit-outer-spin-button],
input[::-webkit-inner-spin-button] {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* ==========================================================================
   5. INTERACTIVE BUTTONS
   ========================================================================== */
.btn-gaming {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-neon-hover) 0%, var(--primary-neon) 100%);
    border: none;
    border-radius: 8px;
    color: #020508;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-glow:hover:not(:disabled) {
    box-shadow: 0 0 25px var(--primary-neon);
    transform: translateY(-2px);
}

.btn-gaming:disabled {
    background: var(--border-color);
    color: var(--text-grey);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   6. PAYMENT DISPLAY & QRIS WRAPPER
   ========================================================================== */
.invoice-badge {
    display: inline-block;
    background: #1a2436;
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-grey);
    margin-top: 5px;
}

.qris-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 25px 0;
}

.qris-glow-border {
    background: #ffffff;
    padding: 12px;
    border-radius: 14px;
    box-shadow: 0 0 30px rgba(0, 255, 102, 0.25);
    display: inline-block;
    transition: transform 0.3s ease;
}

.qris-glow-border:hover {
    transform: scale(1.02);
}

.qris-glow-border img {
    width: 220px;
    height: 220px;
    display: block;
}

.qris-timer {
    font-size: 0.8rem;
    color: var(--text-grey);
    margin-top: 15px;
    text-align: center;
}

/* ==========================================================================
   7. TRANSACTION DETAILS TABLE STYLE
   ========================================================================== */
.tx-details {
    background: #090e15;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 18px;
    margin: 20px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.95rem;
    border-bottom: 1px dashed var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-row:first-child {
    padding-top: 0;
}

.detail-row span {
    color: var(--text-grey);
}

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

/* Real-time Polling Status Loader */
.loading-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-grey);
    background: rgba(31, 42, 63, 0.3);
    padding: 12px;
    border-radius: 8px;
}

/* ==========================================================================
   8. SUCCESS STATE & NOTIFICATIONS
   ========================================================================== */
.success-icon-wrapper {
    width: 65px;
    height: 65px;
    background: rgba(0, 255, 102, 0.1);
    border: 2px solid var(--primary-neon);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 0 20px var(--primary-neon-glow);
}

.success-checkmark {
    color: var(--primary-neon);
    font-size: 2rem;
    font-weight: bold;
}

.alert-box {
    background: rgba(0, 255, 102, 0.06);
    border-left: 4px solid var(--primary-neon);
    padding: 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 20px 0;
}

.alert-box a {
    text-decoration: none;
    font-weight: bold;
    transition: text-shadow 0.3s ease;
}

.alert-box a:hover {
    text-shadow: 0 0 8px var(--primary-neon);
}

/* Dynamic Clipboard Copy Component */
.copy-link-box {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.copy-link-box input {
    font-size: 0.85rem;
    color: var(--text-grey);
    background: #06090e;
    cursor: default;
}

.btn-gaming-sm {
    background: #1a2436;
    border: 1px solid var(--border-color);
    color: var(--text-white);
    padding: 0 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-gaming-sm:hover {
    background: var(--primary-neon);
    color: #000;
    border-color: var(--primary-neon);
    box-shadow: 0 0 15px var(--primary-neon-glow);
}

/* Toast Global Alert System */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: var(--primary-neon);
    color: #020508;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 10px 25px rgba(0, 255, 102, 0.3);
    z-index: 100;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

/* ==========================================================================
   9. HARDWARE CORE KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-neon {
    border: 2px solid #0b1017;
    border-top: 2px solid var(--primary-neon);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 0.8s linear infinite;
}

/* ==========================================================================
   10. MEDIA QUERIES (FULL RESPONSIVE ENGINE)
   ========================================================================== */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .gaming-card {
        padding: 20px 15px;
        border-radius: 12px;
    }

    .card-header h2, .card-header h3 {
        font-size: 1.4rem;
    }

    .qris-glow-border img {
        width: 180px;
        height: 180px;
    }
    
    .detail-row {
        font-size: 0.88rem;
    }
}
.btn-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.btn-select-opt {
    background: #111622;
    border: 1px solid #1f2a3f;
    color: #8b9bb4;
    padding: 10px 5px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}
.btn-select-opt:hover {
    border-color: #00ff66;
    color: #fff;
}
.btn-select-opt.active {
    background: rgba(0, 255, 102, 0.15);
    border-color: #00ff66;
    color: #00ff66;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.2);
}
@media (max-width: 400px) {
    .btn-grid { grid-template-columns: repeat(3, 1fr); }
}
