:root {
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #005ce6;
    --primary-hover: #0044b3;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --success: #10b981;
    --error: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding: 20px 16px;
}

/* Dynamic Background Blobs */
.background-blobs {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* Brand / Logo */
.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
}

.brand-name {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* Glassmorphism Panel */
.kiosk-container {
    width: 90%;
    max-width: 500px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.glass-panel-inner {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
}

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

.logo {
    height: 40px;
    margin-bottom: 15px;
}

h1, h2 {
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Steps */
.step {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Elements */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

input[type="tel"], input[type="number"] {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* Amount Grid */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.amt-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 12px 0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.amt-btn.selected, .amt-btn:active {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(0.95);
}

/* Fee Visualizer */
.fee-visualizer {
    margin: 25px 0;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.fee-row.total {
    margin-top: 12px;
    margin-bottom: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.highlight {
    color: var(--accent);
}

hr {
    border: 0;
    border-top: 1px solid var(--glass-border);
    margin: 12px 0;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-secondary {
    width: 100%;
    padding: 16px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.2s;
}

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

/* Payment Screen */
.payment-box {
    text-align: center;
}

.amount-due {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 5px;
}

.qr-code {
    width: 200px;
    height: 200px;
    background: white;
    padding: 10px;
    border-radius: 16px;
    margin: 20px auto;
    display: block;
}

/* Spinner */
.polling-status {
    margin-top: 20px;
}
.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.timeout-text {
    color: var(--error);
    font-weight: 600;
    margin-top: 5px;
}

/* Success Screen */
.success-icon {
    width: 70px;
    height: 70px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px auto;
    color: white;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.receipt {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}
.receipt p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: white;
}
.receipt p:last-child { margin-bottom: 0; }

.error-icon {
    width: 70px;
    height: 70px;
    background: var(--error);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px auto;
    color: white;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    animation: pulse-error 2s infinite;
}

@keyframes pulse-error {
    0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 40px rgba(239, 68, 68, 0.8); }
}

.error-msg {
    color: var(--error);
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    min-height: 20px;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 600px) {
    body {
        padding: 12px 8px;
        align-items: flex-start;
    }

    .kiosk-container {
        width: 100%;
        max-width: 100%;
        padding: 24px 18px;
        border-radius: 18px;
        margin: 0 auto;
    }

    .brand-name {
        font-size: 1.4rem;
    }

    h1 {
        font-size: 1.3rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    .amount-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .amt-btn {
        padding: 14px 0;
        font-size: 0.95rem;
    }

    input[type="tel"], input[type="number"] {
        padding: 14px;
        font-size: 1rem;
    }

    .btn-primary, .btn-secondary {
        padding: 15px;
        font-size: 1rem;
    }

    .fee-row.total {
        font-size: 1.05rem;
    }

    .amount-due {
        font-size: 2.2rem;
    }

    .qr-code {
        width: 160px;
        height: 160px;
    }

    .blob-1 {
        width: 200px;
        height: 200px;
    }

    .blob-2 {
        width: 150px;
        height: 150px;
    }
}

/* Tablet */
@media (min-width: 601px) and (max-width: 900px) {
    .kiosk-container {
        max-width: 460px;
    }
}

