/* ===================================
   JuiceStop.ink - Main Styles
   AMOLED Dark Theme
   Neon Purple & Cyan Accents
   =================================== */

/* ===== CSS Variables ===== */
:root {
    --primary-cyan: #00f5ff;
    --secondary-purple: #b366ff;
    --accent-pink: #ff66cc;
    --accent-green: #03fd70;
    --bg-pure-black: #000000;
    --bg-dark: #050509;
    --bg-darker: #020206;
    --bg-panel: #101018;
    --bg-panel-dark: #080810;
    --text-light: #ffffff;
    --text-muted: #a5a5b8;
    --text-dim: #6b6b7a;
    --border-glow: rgba(0, 245, 255, 0.45);
    --shadow-cyan: 0 0 16px rgba(0, 245, 255, 0.18);
    --shadow-purple: 0 0 16px rgba(179, 102, 255, 0.18);
    --shadow-pink: 0 0 16px rgba(255, 102, 204, 0.2);
}

/* ===== Global Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== Body & Background ===== */
html,
body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    font-family: 'Tektur', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        radial-gradient(circle at 12% 18%, rgba(179, 102, 255, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 85% 82%, rgba(0, 245, 255, 0.18) 0%, transparent 48%),
        linear-gradient(145deg, #000000 0%, #050513 35%, #050515 70%, #050509 100%);
    color: var(--text-light);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Animated Background Glow */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 30%, rgba(179, 102, 255, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 85% 70%, rgba(0, 245, 255, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 102, 204, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}



/* ===== Container & Panel ===== */
.menu-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 22px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.menu-panel {
    position: relative;
    text-align: center;
    padding: 42px 34px;
    background: radial-gradient(circle at top, rgba(0, 245, 255, 0.06), transparent 55%),
                radial-gradient(circle at bottom, rgba(179, 102, 255, 0.09), transparent 65%),
                linear-gradient(145deg, rgba(10, 10, 20, 0.98), rgba(4, 4, 10, 0.98));
    border-radius: 30px;
    border: 1px solid rgba(0, 245, 255, 0.5);
    box-shadow:
        0 0 40px rgba(0, 245, 255, 0.18),
        0 0 60px rgba(179, 102, 255, 0.18),
        inset 0 0 22px rgba(0, 0, 0, 0.85);
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
    backdrop-filter: blur(18px);
}

@keyframes panelGlow {
    0%, 100% {
        border-color: rgba(0, 245, 255, 0.7);
        box-shadow:
            0 0 55px rgba(0, 245, 255, 0.25),
            0 0 90px rgba(179, 102, 255, 0.25),
            inset 0 0 26px rgba(0, 0, 0, 0.9);
    }
    33% {
        border-color: rgba(179, 102, 255, 0.7);
        box-shadow:
            0 0 55px rgba(179, 102, 255, 0.3),
            0 0 90px rgba(255, 102, 204, 0.2),
            inset 0 0 26px rgba(0, 0, 0, 0.9);
    }
    66% {
        border-color: rgba(255, 102, 204, 0.7);
        box-shadow:
            0 0 55px rgba(255, 102, 204, 0.3),
            0 0 90px rgba(0, 245, 255, 0.2),
            inset 0 0 26px rgba(0, 0, 0, 0.9);
    }
}

/* Panel hover micro-move (desktop only) */
@media (pointer: fine) {
    .menu-panel-main:hover {
        transform: translateY(-2px);
    }
}

/* ===== Header / Logo ===== */
.menu-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.main-logo {
    width: 280px;
    max-width: 90%;
    margin: 0 auto 18px;
    display: block;
    cursor: pointer;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 18px rgba(0, 245, 255, 0.55));
}

.main-logo:hover {
    transform: scale(1.04);
    filter:
        drop-shadow(0 0 26px rgba(0, 245, 255, 0.9))
        drop-shadow(0 0 20px rgba(179, 102, 255, 0.75));
}

/* ===== Corner Icons ===== */
.status-icon {
    position: absolute;
    top: 20px;
    left: 22px;
    width: 46px;
    height: 46px;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 0 14px rgba(0, 245, 255, 0.75));
    z-index: 10;
}

.status-icon:hover {
    transform: scale(1.12) rotate(10deg);
    filter: drop-shadow(0 0 24px rgba(0, 245, 255, 1));
}

.cart-button {
    position: absolute;
    top: 20px;
    right: 22px;
    font-size: 40px;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 0 14px rgba(255, 102, 204, 0.8));
    z-index: 10;
}

.cart-button:hover {
    transform: scale(1.15) rotate(-12deg);
    filter: drop-shadow(0 0 24px rgba(255, 102, 204, 1));
}

/* ===== Typography ===== */
.welcome-text {
    margin: 10px 0 4px;
}

.welcome-title {
    font-weight: 600;
    letter-spacing: 0.03em;
    font-size: 1.35rem;
    color: var(--primary-cyan);
    text-shadow: 0 0 14px rgba(0, 245, 255, 0.9);
}

.welcome-brand {
    color: var(--secondary-purple);
    text-shadow: 0 0 14px rgba(179, 102, 255, 0.9);
}

.welcome-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.menu-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.menu-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid rgba(0, 245, 255, 0.4);
    background: radial-gradient(circle at top, rgba(0, 245, 255, 0.15), transparent 70%);
    color: var(--text-muted);
}

.badge-alpha {
    border-color: rgba(255, 102, 204, 0.7);
    color: var(--accent-pink);
}

.badge-status {
    border-color: rgba(0, 245, 255, 0.6);
}

/* Divider line */
.menu-divider {
    margin: 20px auto 10px;
    width: 70%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(0, 245, 255, 0.9),
        rgba(179, 102, 255, 0.9),
        transparent
    );
    opacity: 0.7;
}

.page-title,
h2 {
    font-size: 2.6rem;
    color: var(--accent-pink);
    text-shadow:
        0 0 16px rgba(255, 102, 204, 0.75),
        0 0 22px rgba(179, 102, 255, 0.6);
    margin: 18px 0 22px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h3 {
    color: var(--primary-cyan);
    font-size: 1.6rem;
    margin-bottom: 14px;
    text-shadow: 0 0 14px rgba(0, 245, 255, 0.8);
}

/* ===== Buttons ===== */
button {
    font-family: inherit;
    background: linear-gradient(145deg, var(--primary-cyan), var(--secondary-purple));
    color: var(--bg-pure-black);
    border: none;
    border-radius: 16px;
    padding: 15px 26px;
    font-size: 1.08rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
    width: 100%;
    margin: 8px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7), var(--shadow-cyan);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Sweep highlight */
button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -110%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    opacity: 0.7;
    transition: left 0.65s;
}

button:hover::before {
    left: 110%;
}

button:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.9),
        0 0 24px rgba(0, 245, 255, 0.6);
}

button:active {
    transform: translateY(-1px) scale(0.99);
}

/* Button content layout */
.btn-emoji {
    margin-right: 8px;
    font-size: 1.25em;
}

.btn-label {
    display: inline-block;
    vertical-align: middle;
}

/* Button Subtitle */
.button-subtitle {
    display: block;
    font-size: 0.82rem;
    opacity: 0.95;
    margin-top: 4px;
    color: var(--bg-pure-black);
}

/* Variants */
.btn-primary {
    background: linear-gradient(145deg, var(--primary-cyan), var(--secondary-purple));
}

.btn-secondary {
    background: linear-gradient(145deg, #141428, #10101e);
    color: var(--primary-cyan);
    border: 1px solid rgba(0, 245, 255, 0.55);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.9);
}

.btn-secondary .button-subtitle {
    color: var(--text-muted);
}

.btn-ghost {
    background: linear-gradient(145deg, #0b0b12, #07070b);
    color: var(--text-light);
    border: 1px solid rgba(179, 102, 255, 0.8);
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.9),
        0 0 18px rgba(179, 102, 255, 0.55);
}

.btn-ghost .button-subtitle {
    color: var(--text-muted);
}

.highlight-button {
    background: linear-gradient(145deg, #ff66cc, #ffb3ff);
    color: #100010;
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.9),
        0 0 30px rgba(255, 102, 204, 0.9);
}

.back-btn {
    background: linear-gradient(145deg, #2d0b1b, #3b0011);
    color: var(--text-light);
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.95),
        0 0 18px rgba(255, 20, 147, 0.7);
}

.back-btn .button-subtitle {
    color: var(--text-light);
}

.btn-admin,
.btn-admin-primary {
    background: linear-gradient(145deg, #141428, #10101e);
    color: var(--primary-cyan);
    border: 1px solid rgba(0, 245, 255, 0.7);
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.95),
        0 0 20px rgba(0, 245, 255, 0.6);
}

/* Button shake for attention */
.shake-button {
    animation: shake 0.7s ease-in-out 2s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px) rotate(-0.8deg); }
    75% { transform: translateX(3px) rotate(0.8deg); }
}

/* ===== Menu Sections ===== */
.menu-section {
    margin: 18px 0;
}

.menu-buttons,
.submenu-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0 20px;
    animation: fadeInSection 0.45s ease;
}

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

.submenu-buttons {
    display: none; /* JS toggles this */
}

.spacer {
    height: 10px;
}

/* ===== Info Boxes ===== */
.info-box {
    display: none; /* JS toggles this */
    background: linear-gradient(145deg, rgba(7, 7, 18, 0.98), rgba(2, 2, 8, 0.98));
    border: 1px solid rgba(0, 245, 255, 0.7);
    border-radius: 20px;
    padding: 26px 22px;
    margin: 20px 0 10px;
    box-shadow:
        0 0 22px rgba(0, 245, 255, 0.4),
        0 0 40px rgba(0, 0, 0, 0.9);
}

.info-box h3 {
    margin-top: 0;
}

.info-box p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 18px;
    font-size: 0.98rem;
}

.info-error {
    border-color: rgba(255, 77, 108, 0.9);
    box-shadow:
        0 0 24px rgba(255, 77, 108, 0.8),
        0 0 40px rgba(0, 0, 0, 0.95);
}

/* ===== Admin PIN ===== */
.admin-section {
    margin-top: 10px;
}

.admin-pin-label {
    display: block;
    text-align: left;
    margin: 4px 2px 4px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.admin-pin-hint {
    display: block;
    margin-top: 3px;
    font-size: 0.78rem;
    color: var(--text-dim);
}

.admin-pin-input {
    width: 100%;
    padding: 13px 16px;
    margin: 8px 0 18px;
    border-radius: 14px;
    border: 1px solid rgba(0, 245, 255, 0.75);
    background: rgba(0, 0, 0, 0.75);
    color: var(--primary-cyan);
    font-size: 1rem;
    text-align: center;
    outline: none;
    box-shadow:
        0 0 18px rgba(0, 245, 255, 0.5),
        0 0 24px rgba(0, 0, 0, 0.95);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.admin-pin-input::placeholder {
    color: rgba(0, 245, 255, 0.6);
}

.admin-pin-input:focus {
    border-color: rgba(179, 102, 255, 0.9);
    background: rgba(0, 0, 0, 0.9);
    box-shadow:
        0 0 22px rgba(179, 102, 255, 0.9),
        0 0 30px rgba(0, 0, 0, 0.95);
}

/* ===== Modals ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.98));
    backdrop-filter: blur(10px);
    z-index: 9999;

    /* allow scrolling on small screens */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    /* center-ish, but still scrollable */
    padding: 24px 12px;
    justify-content: center;
    align-items: flex-start;

    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: radial-gradient(circle at top, #181829, #050509);
    border: 1px solid rgba(179, 102, 255, 0.9);
    border-radius: 24px;
    padding: 38px 26px;
    max-width: 560px;
    width: 92%;
    box-shadow:
        0 0 70px rgba(179, 102, 255, 0.75),
        0 0 40px rgba(0, 0, 0, 1);
    animation: modalSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);

    /* key fix */
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    margin: 0 auto;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-content h3 {
    color: var(--secondary-purple);
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 20px;
    text-shadow: 0 0 22px rgba(179, 102, 255, 0.9);
}

.bullet-item {
    color: var(--text-light);
    margin: 14px 0;
    padding-left: 8px;
    line-height: 1.7;
    opacity: 0;
    transform: translateX(-18px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    font-size: 0.98rem;
}

.bullet-item.show {
    opacity: 1;
    transform: translateX(0);
}
/* ===== Account Credit Modal ===== */
.credit-modal-content {
    max-width: 640px;
}

.credit-intro {
    color: var(--text-light);
    margin-bottom: 16px;
    font-size: 0.98rem;
}

.credit-usage-card {
    margin: 14px 0 6px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(
        145deg,
        rgba(0, 245, 255, 0.06),
        rgba(179, 102, 255, 0.04)
    );
    border: 1px solid rgba(0, 245, 255, 0.25);
}

.credit-usage-card h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1rem;
}

.credit-usage-list {
    margin: 0;
    padding-left: 18px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.credit-usage-list li {
    margin-bottom: 4px;
}

.credit-wallet-box {
    margin: 18px 0 10px;
    padding: 16px 16px 12px;
    border-radius: 14px;

}

.credit-wallet-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.credit-wallet-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.credit-wallet-input {
    margin-top: 4px;
}

.credit-wallet-note,
.credit-usage-note {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-top: 8px;
}

.credit-copy-btn {
    min-width: 0 !important;
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
    border-radius: 999px !important;
}

/* Modal Buttons */
#modal-buttons,
.modal-buttons-single {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 13px 22px;
    font-size: 1rem;
    flex: 1;
    min-width: 140px;
    margin: 5px;
}

.danger-btn {
    background: linear-gradient(145deg, #ff0040, #b3002a);
    color: var(--text-light);
    box-shadow: 0 6px 22px rgba(255, 0, 64, 0.55);
}

.warning-btn {
    background: linear-gradient(145deg, #ffcc33, #ff8800);
    color: #1a0b00;
    box-shadow: 0 6px 22px rgba(255, 192, 64, 0.6);
}

.success-btn {
    background: linear-gradient(145deg, var(--accent-green), #00cc66);
    color: var(--bg-pure-black);
    box-shadow: 0 6px 22px rgba(3, 253, 112, 0.6);
}

/* Link Container */
.link-container {
    margin: 22px 0;
}

.link-textbox {
    width: 100%;
    padding: 14px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(0, 245, 255, 0.8);
    border-radius: 14px;
    color: var(--primary-cyan);
    font-family: 'Courier New', monospace;
    font-size: 0.92rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.link-textbox:hover {
    background: rgba(0, 245, 255, 0.1);
    box-shadow: 0 0 22px rgba(0, 245, 255, 0.6);
}

.link-textbox:focus {
    outline: none;
    border-color: var(--secondary-purple);
    box-shadow: 0 0 26px rgba(179, 102, 255, 0.75);
}

/* ===== Footer ===== */
.menu-footer {
    margin-top: 26px;
    padding: 18px 0 6px;
    font-size: 0.95rem;
    color: var(--primary-cyan);
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.8);
    border-top: 1px solid rgba(0, 245, 255, 0.18);
}

.footer-brand {
    font-weight: 600;
}

.footer-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-divider {
    margin: 0 6px;
    color: rgba(0, 245, 255, 0.4);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .menu-panel {
        padding: 32px 22px;
        border-radius: 24px;
    }

    .page-title,
    h2 {
        font-size: 2.2rem;
    }

    .main-logo {
        width: 230px;
        margin-bottom: 14px;
    }

    button {
        font-size: 1rem;
        padding: 13px 20px;
    }

    .status-icon,
    .cart-button {
        width: 38px;
        height: 38px;
        font-size: 32px;
        top: 14px;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .modal-content h3 {
        font-size: 1.7rem;
    }

    .bullet-item {
        font-size: 0.95rem;
    }

    .menu-divider {
        width: 80%;
    }
}

@media (max-width: 480px) {
    .menu-panel {
        padding: 26px 18px;
        border-radius: 20px;
    }

    .page-title,
    h2 {
        font-size: 1.9rem;
    }

    .main-logo {
        width: 200px;
    }

    button {
        font-size: 0.96rem;
        padding: 12px 18px;
    }

    .status-icon,
    .cart-button {
        width: 34px;
        height: 34px;
        font-size: 30px;
        top: 12px;
    }

    .welcome-title {
        font-size: 1.2rem;
    }

    .welcome-subtitle {
        font-size: 0.9rem;
    }

    .menu-footer {
        font-size: 0.9rem;
    }

    #modal-buttons {
        flex-direction: column;
    }

    .modal-btn {
        min-width: 100%;
    }
}

@media (max-width: 360px) {
    .menu-panel {
        padding: 22px 14px;
    }

    .page-title,
    h2 {
        font-size: 1.7rem;
    }

    button {
        font-size: 0.9rem;
        padding: 11px 16px;
    }
}

/* ===================================
   Error Pages (404, 500)
   =================================== */

.error-panel {
    max-width: 650px;
}

.error-icon {
    font-size: 6rem;
    margin-bottom: 25px;
    animation: errorIconFloat 3s ease-in-out infinite;
}

@keyframes errorIconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.error-code {
    font-size: 6rem;
    color: var(--accent-pink);
    text-shadow: 0 0 35px rgba(255, 102, 204, 0.8);
    margin: 20px 0;
    animation: errorCodePulse 2s ease-in-out infinite;
}

@keyframes errorCodePulse {
    0%, 100% {
        text-shadow: 0 0 35px rgba(255, 102, 204, 0.8);
    }
    50% {
        text-shadow: 0 0 50px rgba(179, 102, 255, 1);
    }
}

.error-title {
    color: var(--primary-cyan);
    font-size: 2.2rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.7);
}

.error-message {
    color: var(--text-muted);
    margin-bottom: 35px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.error-button {
    max-width: 320px;
    margin: 0 auto;
    background: linear-gradient(145deg, var(--accent-green), var(--primary-cyan));
    box-shadow: 0 6px 25px rgba(3, 253, 112, 0.4);
}

.error-button:hover {
    box-shadow: 0 10px 35px rgba(3, 253, 112, 0.6);
}

/* Error Page Responsive */
@media (max-width: 768px) {
    .error-icon {
        font-size: 5rem;
    }

    .error-code {
        font-size: 5rem;
    }

    .error-title {
        font-size: 1.9rem;
    }

    .error-message {
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .error-icon {
        font-size: 4rem;
    }

    .error-code {
        font-size: 4rem;
    }

    .error-title {
        font-size: 1.6rem;
    }

    .error-message {
        font-size: 1rem;
    }
}


/* ========== MICRO-INTERACTIONS ========== */

/* Cart count bounce on update */
.cart-count.bounce {
    animation: cartBounce 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
@keyframes cartBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.5); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* Button ripple effect */
.ripple-btn {
    position: relative;
    overflow: hidden;
}
.ripple-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.4s, opacity 0.8s;
}
.ripple-btn:active::after {
    transform: scale(0, 0);
    opacity: 0.4;
    transition: 0s;
}

/* Price change flash */
.price-flash {
    animation: priceFlash 0.6s ease-out;
}
@keyframes priceFlash {
    0% { color: #03fd70; transform: scale(1.1); text-shadow: 0 0 25px #03fd70; }
    100% { color: inherit; transform: scale(1); text-shadow: none; }
}

/* Number counter animation */
.number-tick {
    display: inline-block;
    animation: numberTick 0.2s ease-out;
}
@keyframes numberTick {
    0% { transform: translateY(-100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}
.number-tick-down {
    animation: numberTickDown 0.2s ease-out;
}
@keyframes numberTickDown {
    0% { transform: translateY(100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ========== SKELETON LOADERS ========== */
.skeleton {
    background: linear-gradient(90deg, #1a1a1a 25%, #2d2d2d 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
    color: transparent !important;
}
.skeleton * { visibility: hidden; }
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 16px;
    margin: 8px 0;
    border-radius: 4px;
}
.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }
.skeleton-text.long { width: 100%; }

.skeleton-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
    border-radius: 12px;
    margin-bottom: 15px;
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: 280px;
    max-width: 380px;
    padding: 14px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}
.toast.hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}
@keyframes toastSlideIn {
    0% { transform: translateX(120%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes toastSlideOut {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(120%); opacity: 0; }
}

.toast-success {
    background: linear-gradient(135deg, rgba(3, 253, 112, 0.15), rgba(0, 20, 10, 0.95));
    border-color: rgba(3, 253, 112, 0.4);
}
.toast-success .toast-icon { color: #03fd70; }

.toast-error {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.15), rgba(30, 0, 0, 0.95));
    border-color: rgba(255, 68, 68, 0.4);
}
.toast-error .toast-icon { color: #ff4444; }

.toast-info {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15), rgba(0, 10, 20, 0.95));
    border-color: rgba(0, 255, 255, 0.4);
}
.toast-info .toast-icon { color: #00ffff; }

.toast-icon {
    font-size: 22px;
    flex-shrink: 0;
}
.toast-content {
    flex: 1;
}
.toast-title {
    font-family: 'Tektur', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    margin-bottom: 2px;
}
.toast-message {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}
.toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s;
    max-width: 50px;
}
.toast-close:hover { color: #fff; }

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    border-radius: 0 0 12px 12px;
    animation: toastProgress 4s linear forwards;
}
@keyframes toastProgress {
    0% { width: 100%; }
    100% { width: 0%; }
}

/* ========== URGENCY BADGES ========== */
.stock-urgency {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: urgencyPulse 2s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.4);
}
@keyframes urgencyPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 68, 68, 0.4); }
    50% { box-shadow: 0 0 25px rgba(255, 68, 68, 0.7); }
}
.stock-urgency::before {
    content: '🔥';
    font-size: 12px;
}

.viewing-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 102, 204, 0.15);
    border: 1px solid rgba(255, 102, 204, 0.4);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #ff66cc;
}
.viewing-dot {
    width: 8px;
    height: 8px;
    background: #ff66cc;
    border-radius: 50%;
    animation: viewingPulse 1.5s infinite;
}
@keyframes viewingPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ========== GLASSMORPHISM MODALS ========== */
.glass-modal {
    background: rgba(10, 10, 20, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.glass-card {
    background: rgba(20, 20, 35, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ========== ANIMATED GRADIENT BORDER ========== */
.gradient-border {
    position: relative;
    background: #0a0a0a;
    border-radius: 12px;
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: linear-gradient(45deg, #00ffff, #ff66cc, #00ffff, #ff66cc);
    background-size: 300% 300%;
    animation: gradientRotate 4s linear infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}
.gradient-border:focus-within::before,
.gradient-border:hover::before {
    opacity: 1;
}
@keyframes gradientRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ========== SECURE CHECKOUT ANIMATION ========== */
.secure-lock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.secure-lock svg {
    animation: lockPulse 2s ease-in-out infinite;
}
@keyframes lockPulse {
    0%, 100% { filter: drop-shadow(0 0 3px #03fd70); }
    50% { filter: drop-shadow(0 0 10px #03fd70); }
}

/* ========== SWIPE TO DELETE (Mobile) ========== */
.swipe-container {
    position: relative;
    overflow: hidden;
}
.swipe-item {
    position: relative;
    transition: transform 0.3s ease;
    touch-action: pan-y;
}
.swipe-item.swiping {
    transition: none;
}
.swipe-delete-bg {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(90deg, transparent, #ff3333);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
    color: #fff;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.2s;
}
.swipe-item.swiped .swipe-delete-bg {
    opacity: 1;
}

/* ========== STICKY ADD TO CART (Mobile) ========== */
@media (max-width: 768px) {
    .sticky-cart-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(10, 10, 20, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(0, 255, 255, 0.3);
        padding: 12px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
        z-index: 1000;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5);
    }
    .sticky-cart-bar.visible {
        transform: translateY(0);
    }
    .sticky-cart-bar .sticky-price {
        font-family: 'Tektur', sans-serif;
        font-size: 22px;
        font-weight: 700;
        color: #03fd70;
    }
    .sticky-cart-bar .sticky-btn {
        flex: 1;
        max-width: 200px;
        padding: 14px 20px;
        background: linear-gradient(145deg, #03fd70, #02cc5a);
        border: none;
        border-radius: 12px;
        color: #000;
        font-family: 'Tektur', sans-serif;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
    }
}

/* ========== STAR RATINGS ========== */
.star-rating {
    display: inline-flex;
    gap: 2px;
}
.star-rating .star {
    color: #333;
    font-size: 16px;
}
.star-rating .star.filled {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}
.star-rating .star.half {
    background: linear-gradient(90deg, #ffd700 50%, #333 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========== RECENT ORDER POPUP ========== */
.recent-order-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 320px;
    z-index: 9998;
    animation: popupSlideIn 0.5s ease-out;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.recent-order-popup.hiding {
    animation: popupSlideOut 0.3s ease-in forwards;
}
@keyframes popupSlideIn {
    0% { transform: translateX(-120%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes popupSlideOut {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-120%); opacity: 0; }
}
.recent-order-popup .popup-icon {
    font-size: 28px;
}
.recent-order-popup .popup-content {
    flex: 1;
}
.recent-order-popup .popup-title {
    font-size: 12px;
    color: #03fd70;
    margin-bottom: 2px;
}
.recent-order-popup .popup-text {
    font-size: 13px;
    color: #fff;
}
.recent-order-popup .popup-time {
    font-size: 11px;
    color: #666;
}

/* ========== INPUT FOCUS GLOW ========== */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #00ffff !important;
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.15), 0 0 20px rgba(0, 255, 255, 0.2) !important;
}


/* ===== Account Credit + Redeem Row ===== */
.account-credit-row {
    margin: 20px 10px 30px;
    max-width: 820px;
    max-height: 40px;
    padding-bottom: 40px;
    padding-top: 0px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

/* Credit pill */
.account-credit-bar {
    flex: 1 1 220px;
    padding: 8px 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: radial-gradient(circle at top, rgba(0, 245, 255, 0.08), rgba(5, 5, 15, 0.98));
    border: 1px solid rgba(0, 245, 255, 0.5);
    box-shadow:
        0 0 20px rgba(0, 245, 255, 0.35),
        0 0 28px rgba(179, 102, 255, 0.25);
}

.account-credit-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.11em;
}

.account-credit-amount {
    font-family: 'Tektur', system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--accent-green);
    text-shadow: 0 0 10px rgba(3, 253, 112, 0.9);
}

.account-credit-topup-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(179, 102, 255, 0.95);
    background: radial-gradient(circle at 30% 0%, rgba(179, 102, 255, 1), rgba(10, 10, 20, 1));
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 18px rgba(179, 102, 255, 0.9);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.account-credit-topup-btn:hover {
    transform: scale(1.08) translateY(-1px);
    box-shadow: 0 0 26px rgba(179, 102, 255, 1);
    filter: drop-shadow(0 0 8px rgba(179, 102, 255, 0.9));
}

/* Credit label/value wrap logic (1 line on wide screens, 2 lines on tight) */
.account-credit-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
    max-height: 20px;
    margin-top: -22px; 
}
@media (min-width: 520px) {
    .account-credit-text {
        flex-direction: row;
        align-items: baseline;
        gap: 10px;
    }
}
.account-credit-label,
.account-credit-amount {
    white-space: nowrap;
}

/* Collapsible history */
.credit-history-collapsible {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 14px;
}

.collapsible-toggle {
    width: 100%;
    border: 1px solid rgba(0, 245, 255, 0.25);
    background: linear-gradient(145deg, rgba(0,245,255,0.05), rgba(179,102,255,0.04));
    color: #fff;
    padding: 10px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(0,245,255,0.12);
}

.collapsible-chevron {
    transition: transform 0.2s ease;
    opacity: 0.9;
}

.collapsible-toggle[aria-expanded="true"] .collapsible-chevron {
    transform: rotate(180deg);
}

.collapsible-body {
    margin-top: 10px;
}

.history-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.history-table th,
.history-table td {
    padding: 10px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    vertical-align: top;
}

.history-table th {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    font-size: 0.78rem;
    white-space: nowrap;
}

.tag-gifted { border-color: rgba(0,245,255,0.35); box-shadow: 0 0 14px rgba(0,245,255,0.10); }
.tag-topped-up { border-color: rgba(179,102,255,0.45); box-shadow: 0 0 14px rgba(179,102,255,0.12); }
.tag-redeemed { border-color: rgba(3,253,112,0.35); box-shadow: 0 0 14px rgba(3,253,112,0.10); }
.tag-spent { border-color: rgba(255,0,64,0.35); box-shadow: 0 0 14px rgba(255,0,64,0.10); }

.money-pos { color: #03fd70; text-shadow: 0 0 10px rgba(3,253,112,0.35); }
.money-neg { color: #ff2a5c; text-shadow: 0 0 10px rgba(255,0,64,0.25); }


/* Redeem code block */
.redeem-code-wrapper {
    flex: 1 1 260px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
}

.redeem-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.redeem-input-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.redeem-code-input {
    flex: 1 1 auto;
    border-radius: 999px;
    border: 1px solid rgba(0, 245, 255, 0.6);
    background: radial-gradient(circle at top, rgba(0, 245, 255, 0.08), rgba(10, 10, 20, 0.98));
    color: #fff;
    padding: 8px 14px;
    font-size: 0.9rem;
    outline: none;
    box-shadow:
        0 0 14px rgba(0, 245, 255, 0.35),
        0 0 8px rgba(0, 0, 0, 0.9);
}

.redeem-code-input::placeholder {
    color: rgba(200, 200, 255, 0.5);
}

.redeem-code-input:focus {
    border-color: rgba(179, 102, 255, 0.9);
    box-shadow:
        0 0 20px rgba(179, 102, 255, 0.7),
        0 0 10px rgba(0, 0, 0, 1);
}

.redeem-btn {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Feedback text */
.redeem-feedback {
    min-height: 1.1em;
    margin-top: 4px;
    font-size: 0.8rem;
    text-align: left;
}

.redeem-feedback.redeem-success {
    color: var(--accent-green);
}

.redeem-feedback.redeem-error {
    color: var(--accent-pink);
}

/* Mobile tweaks */
@media (max-width: 600px) {
    .account-credit-row {
        flex-direction: column;
        align-items: stretch;
    }

    .account-credit-bar,
    .redeem-code-wrapper {
        width: 100%;
    }
}


/* ===== 2-Column Menu Button Layout ===== */
.menu-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

/* Span Official Groupchat full width when it's the last button (Admin not present) */
.menu-buttons > .highlight-button:last-child {
    grid-column: 1 / -1;
}

/* Mobile: Stack vertically on small screens */
@media (max-width: 600px) {
    .menu-buttons {
        grid-template-columns: 1fr;
    }
    
    /* Remove spanning on mobile since everything is single column anyway */
    .menu-buttons > .highlight-button:last-child {
        grid-column: 1;
    }
}