@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;600;700&family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

:root {
    --color-bg-main: 2 6 23;
    /* Slate 950 */
    --color-bg-surface: 15 23 42;
    /* Slate 900 */
    --color-bg-surface-hover: 30 41 59;
    /* Slate 800 */
    --color-primary: 6 182 212;
    /* Cyan 500 */
    --color-primary-glow: 6 182 212;
    /* RGB for glow */
    --color-secondary: 217 70 239;
    /* Fuchsia 500 */
    --color-accent: 255 190 0;
    /* Cyber Gold */
    --color-accent-text: 0 0 0;
    /* Black text on Gold */
    --color-text-main: 226 232 240;
    /* Slate 200 */
    --color-text-muted: 100 116 139;
    /* Slate 500 */
    --font-display: 'Orbitron', 'Noto Sans TC', sans-serif;
    --font-body: 'Noto Sans TC', 'Rajdhani', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: rgb(var(--color-bg-main));
    color: rgb(var(--color-text-main));
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.font-display {
    font-family: var(--font-display);
}

/* Custom scrollbar - Scoped to Frontend Only */
/* Uses :has() selector to apply styles only when .store-front exists (frontend pages) */

/* Main page scrollbar - targets body/html when frontend is active */
body:has(.store-front)::-webkit-scrollbar,
html:has(.store-front)::-webkit-scrollbar {
    width: 10px;
    height: 10px;
    background: rgb(var(--color-bg-main));
}

body:has(.store-front)::-webkit-scrollbar-thumb,
html:has(.store-front)::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0ea5e9, #06b6d4);
    border-radius: 9999px;
    border: 2px solid rgb(var(--color-bg-main));
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

body:has(.store-front)::-webkit-scrollbar-thumb:hover,
html:has(.store-front)::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #38bdf8, #22d3ee);
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.7);
}

body:has(.store-front)::-webkit-scrollbar-track,
html:has(.store-front)::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.9);
}

/* Apply to .store-front container and all scrollable elements inside */
.store-front::-webkit-scrollbar,
.store-front *::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: rgb(var(--color-bg-surface));
}

.store-front::-webkit-scrollbar-thumb,
.store-front *::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0ea5e9, #06b6d4);
    border-radius: 9999px;
    box-shadow: 0 0 6px rgba(6, 182, 212, 0.4);
}

.store-front::-webkit-scrollbar-thumb:hover,
.store-front *::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #38bdf8, #22d3ee);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
}

.store-front::-webkit-scrollbar-track,
.store-front *::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.8);
}

/* Firefox scrollbar */
body:has(.store-front),
.store-front,
.store-front * {
    scrollbar-width: thin;
    scrollbar-color: #0ea5e9 rgb(var(--color-bg-main));
}

.bg-grid-pattern {
    background-image: linear-gradient(rgba(6, 182, 212, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: #fff;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(var(--color-bg-main));
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #00ffff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #ff00ff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 30px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 100px, 0);
    }

    40% {
        clip: rect(40px, 9999px, 60px, 0);
    }

    60% {
        clip: rect(20px, 9999px, 100px, 0);
    }

    80% {
        clip: rect(60px, 9999px, 70px, 0);
    }

    100% {
        clip: rect(90px, 9999px, 95px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(60px, 9999px, 70px, 0);
    }

    20% {
        clip: rect(10px, 9999px, 30px, 0);
    }

    40% {
        clip: rect(90px, 9999px, 95px, 0);
    }

    60% {
        clip: rect(20px, 9999px, 50px, 0);
    }

    80% {
        clip: rect(40px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(10px, 9999px, 30px, 0);
    }
}

/* Scanline Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.3;
}

/* Neon Glow */
.neon-blue {
    box-shadow: 0 0 10px rgb(var(--color-primary)), 0 0 20px rgb(var(--color-primary));
}

.neon-pink {
    box-shadow: 0 0 10px rgb(var(--color-secondary)), 0 0 20px rgb(var(--color-secondary));
}

.text-glow {
    text-shadow: 0 0 10px rgba(var(--color-primary-glow), 0.7);
}

/* Cyberpunk Clip Paths */
.clip-path-polygon {
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

.clip-path-button {
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.clip-path-input {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.clip-path-slant-right {
    clip-path: polygon(0 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
}

.clip-path-octagon {
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

.clip-path-square {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.clip-path-box {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.clip-path-hexagon {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.clip-path-diamond {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

/* Login Background */
.login-bg {
    opacity: 0.2;
    filter: blur(4px);
}

/* Animations for Best Seller Card */
@keyframes flow-shine {
    0% {
        transform: translateX(-150%) skewX(-25deg);
    }

    100% {
        transform: translateX(250%) skewX(-25deg);
    }
}

.flow-light::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(var(--color-accent), 0.2),
            rgba(var(--color-accent), 0.5),
            rgba(var(--color-accent), 0.2),
            transparent);
    transform: translateX(-150%) skewX(-25deg);
    pointer-events: none;
    z-index: 20;
}

.group:hover .flow-light::after {
    animation: flow-shine 1.5s ease-in-out infinite;
}

@keyframes border-rotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animated-border {
    position: relative;
    z-index: 0;
    overflow: hidden;
}

.animated-border::before {
    content: '';
    position: absolute;
    z-index: -2;
    left: -50%;
    top: -50%;
    width: 200%;
    height: 200%;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: 0 0;
    background-image: conic-gradient(transparent, rgba(var(--color-accent), 1), transparent 30%);
    animation: rotate 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.group:hover .animated-border::before {
    opacity: 1;
}

@keyframes rotate {
    100% {
        transform: rotate(1turn);
    }
}

/* =========================================
   Chat Widget - Cyberpunk Theme Integration
   ========================================= */

/* =========================================
   Chat Widget - Cyberpunk Theme Integration
   ========================================= */

@keyframes fab-in {
    from {
        transform: translateY(20px) scale(0.8);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.chat-widget-fab {
    position: fixed;
    bottom: 2rem;
    right: 0;
    z-index: 9999;

    /* 垂直標籤尺寸 */
    width: 3.2rem;
    height: 160px;
    padding: 15px 0;

    /* 視覺：強化背景與實色感，不再純毛玻璃 */
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(var(--color-primary), 0.6);
    border-right: none;
    /* 靠右對齊，移除右邊框 */
    color: rgb(var(--color-primary));

    /* 形狀：上方與左側切角 */
    clip-path: polygon(15px 0, 100% 0, 100% 100%, 0 100%, 0 15px);

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(var(--color-primary), 0.2);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    overflow: hidden;

    /* 平滑過渡 */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fab-in 0.5s ease-out forwards;
}

/* 滾動時隱藏樣式 */
.chat-widget-fab.fab-hidden {
    transform: translateY(200px);
    /* 標籤較長，隱藏位移加大 */
    opacity: 0;
    pointer-events: none;
}

.chat-widget-fab .chat-label {
    writing-mode: vertical-rl;
    text-orientation: upright;
    /* 確保中文字垂直不旋轉 */
    white-space: nowrap;
    /* 強制不換行 */
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0.9;
    transition: all 0.3s;
    text-shadow: 0 0 8px rgba(var(--color-primary), 0.3);
}

/* 掃描線特效 */
.chat-widget-fab::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, transparent, rgba(var(--color-primary), 0.3), transparent);
    animation: chat-scan 3s infinite linear;
    pointer-events: none;
}

.chat-widget-fab:hover {
    height: 180px;
    background: rgba(var(--color-primary), 0.1);
    border-color: rgb(var(--color-primary));
    box-shadow: 0 0 30px rgba(var(--color-primary), 0.4);
}

.chat-widget-fab:hover .chat-label {
    opacity: 1;
    letter-spacing: 0.3em;
    color: white;
}

.chat-widget-fab svg {
    filter: drop-shadow(0 0 5px rgb(var(--color-primary)));
    transition: all 0.3s;
}

.chat-widget-fab:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px white);
}

/* 行動端調整 */
@media (max-width: 768px) {
    .chat-widget-fab {
        width: 3.2rem;
        /* 手機端寬度同步放寬，解決文字折行 */
        height: 140px;
        bottom: 6rem;
        /* 避開手機底部操作區域 */
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        /* 手機端底色更深，增加與背景對比度 */
        border-width: 2px;
        border-right: none;
    }

    .chat-widget-fab .chat-label {
        font-size: 0.8rem;
        letter-spacing: 0.15em;
    }
}




/* Main Window - High Contrast Tech Dashboard Style */
.chat-widget-window {
    position: fixed;
    bottom: 0 !important;
    right: 2rem;
    width: 380px;
    height: 600px;
    max-height: 80vh;
    /* Dark frosted glass background */
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    /* Stronger Neon Border */
    border: 2px solid rgb(var(--color-primary));
    border-bottom: none;

    /* Neon Glow */
    box-shadow:
        0 -5px 30px rgba(var(--color-primary), 0.25),
        0 0 15px rgba(var(--color-primary), 0.4),
        inset 0 0 30px rgba(var(--color-primary), 0.1);

    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    animation: slideUpGlitch 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 768px) {
    .chat-widget-window {
        right: 0;
        left: 0;
        width: 100%;
        height: 75vh;
        border-radius: 20px 20px 0 0;
        border-left: none;
        border-right: none;
        margin: 0;
    }
}

/* Subtle Tech Grid Background Pattern */
.chat-widget-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(var(--color-primary), 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--color-primary), 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 0;
    pointer-events: none;
}

/* Cyberpunk Top Bar Decoration */
.chat-widget-window::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgb(var(--color-primary)), rgb(var(--color-secondary)));
    box-shadow: 0 0 15px rgba(var(--color-primary), 0.8);
    z-index: 20;
}

@keyframes slideUpGlitch {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }

    40% {
        transform: translateY(10%);
        opacity: 1;
    }

    60% {
        transform: translateY(15%);
    }

    100% {
        transform: translateY(0);
    }
}

.chat-header {
    padding: 1rem 1.25rem;
    background: rgba(var(--color-primary), 0.05);
    border-bottom: 1px solid rgba(var(--color-primary), 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.chat-header h3 {
    color: rgb(var(--color-primary));
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Cyber Eye Icon Decoration */
.chat-header h3::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    background: rgb(var(--color-accent));
    transform: rotate(45deg);
    box-shadow: 0 0 8px rgb(var(--color-accent));
}

.close-btn {
    color: rgb(var(--color-text-muted));
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    color: rgb(var(--color-secondary));
    transform: rotate(90deg) scale(1.2);
    text-shadow: 0 0 10px rgb(var(--color-secondary));
}

.chat-messages {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Old no-messages removed - using new definition at bottom */

/* Message Bubbles - High Contrast Redesign */
.message-bubble {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    max-width: 85%;
    font-family: 'Noto Sans TC', sans-serif;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

/* Customer Message: Cyan Glow */
.message-bubble.customer {
    background: rgba(var(--color-primary), 0.15);
    border: 1px solid rgb(var(--color-primary));
    color: #fff;
    border-bottom-right-radius: 0;
    box-shadow: 0 0 10px rgba(var(--color-primary), 0.1);
    backdrop-filter: blur(4px);
}

/* Admin Message: Purple/Secondary Glow */
.message-bubble.admin {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgb(var(--color-secondary));
    color: #e2e8f0;
    border-bottom-left-radius: 0;
    box-shadow: 0 0 10px rgba(var(--color-secondary), 0.1);
    backdrop-filter: blur(4px);
}

.admin-badge {
    color: rgb(var(--color-secondary));
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
    margin-left: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.chat-input-area {
    padding: 1.25rem;
    background: #020617;
    border-top: 1px solid rgba(var(--color-primary), 0.3);
    display: flex;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

.chat-input {
    flex: 1;
    background: #0f172a;
    border: 1px solid #334155;
    padding: 0.8rem 1rem;
    color: #e2e8f0;
    font-family: inherit;
    transition: all 0.3s;
    outline: none;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.chat-input:focus {
    border-color: rgb(var(--color-primary));
    background: #1e293b;
    box-shadow: 0 0 15px rgba(var(--color-primary), 0.1);
}

.chat-send-btn {
    background: transparent;
    border: 1px solid rgb(var(--color-primary));
    color: rgb(var(--color-primary));
    width: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.chat-send-btn:hover {
    background: rgb(var(--color-primary));
    color: black;
    box-shadow: 0 0 20px rgba(var(--color-primary), 0.5);
}

/* Start Screen */
.start-chat-form {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    height: 100%;
    position: relative;
    z-index: 10;
}

.start-chat-form h4 {
    color: white;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.start-chat-form input {
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    padding: 1rem;
    transition: all 0.3s;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.start-chat-form input:focus {
    border-color: rgb(var(--color-primary));
    box-shadow: 0 0 15px rgba(var(--color-primary), 0.2);
    outline: none;
}

.start-chat-btn {
    margin-top: 1rem;
    background: rgb(var(--color-accent));
    /* Yellow */
    border: none;
    color: black;
    padding: 1rem;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.start-chat-btn:hover {
    background: #fde047;
    /* Yellow-300 */
    box-shadow: 0 0 30px rgba(var(--color-accent), 0.6);
    transform: translateY(-2px);
}

.no-messages {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgb(var(--color-text-muted));
    text-align: center;
    font-family: var(--font-mono);
    line-height: 1.6;
}

/* Login Required Modal */
.login-required-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.login-required-modal {
    background: #020617;
    border: 1px solid rgb(var(--color-primary));
    border-radius: 4px;
    padding: 2rem;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 0 50px rgba(var(--color-primary), 0.2);
    animation: scaleIn 0.2s ease-out;
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.login-required-modal .modal-icon {
    color: rgb(var(--color-primary));
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 5px rgb(var(--color-primary)));
}

.login-required-modal h3 {
    color: white;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.login-required-modal p {
    color: rgb(var(--color-text-muted));
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.login-required-modal .modal-buttons {
    display: flex;
    gap: 0.75rem;
}

.login-required-modal .btn-cancel {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: rgb(var(--color-text-muted));
    font-family: var(--font-mono);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.login-required-modal .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.login-required-modal .btn-login {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: rgb(var(--color-primary));
    color: black;
    font-family: var(--font-display);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

/* --- Ghost Button (Clear Button) - Cyberpunk Theme --- */
.store-front .btn-ghost {
    background: rgba(var(--color-primary), 0.05) !important;
    border: 2px solid rgb(var(--color-primary)) !important;
    color: rgb(var(--color-primary)) !important;
    padding: 0.6rem 2rem !important;
    font-family: var(--font-display);
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    box-shadow: inset 0 0 10px rgba(var(--color-primary), 0.1) !important;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    text-shadow: 0 0 5px rgba(var(--color-primary), 0.5);
}

.store-front .btn-ghost:hover {
    background: rgb(var(--color-primary)) !important;
    color: black !important;
    border-color: rgb(var(--color-primary)) !important;
    box-shadow: 0 0 20px rgba(var(--color-primary), 0.6) !important;
    text-shadow: none;
    transform: translateY(-2px);
}

.login-required-modal .btn-login:hover {
    background: rgb(var(--color-accent));
    box-shadow: 0 0 15px rgba(var(--color-accent), 0.5);
}

/* Connection Status */
.chat-header .connection-status {
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: auto;
    margin-left: 0.75rem;
    font-family: var(--font-mono);
}

.chat-header .connection-status .connected {
    color: rgb(var(--color-secondary));
    text-shadow: 0 0 5px rgb(var(--color-secondary));
}

.chat-header .connection-status .disconnected {
    color: rgb(var(--color-accent));
    text-shadow: 0 0 5px rgb(var(--color-accent));
}

/* Message Wrapper */
.message-wrapper {
    display: flex;
    flex-direction: column;
}

.message-wrapper.customer {
    align-items: flex-end;
}

.message-wrapper.admin {
    align-items: flex-start;
}

/* Message Meta */
.message-meta {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    font-size: 0.7rem;
    opacity: 0.7;
    font-family: var(--font-mono);
}

/* =========================================
   Toast Notifications - Cyberpunk Theme
   ========================================= */

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-slide-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.toast-frontend {
    background: rgba(15, 23, 42, 0.85);
    /* Slate 900, matte */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    /* Square corners - NO rounded corners */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    min-width: 320px;
    padding: 1rem 1.25rem;
    font-family: 'Rajdhani', sans-serif;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    /* Force square */
}

/* Animations */
.toast-frontend.animate-in {
    animation: toast-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-frontend.animate-out {
    animation: toast-slide-out 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Text & Icon */
.toast-frontend .toast-message {
    color: #e2e8f0;
    font-weight: 600;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
    padding-right: 1rem;
    flex: 1;
}

.toast-frontend .toast-close {
    margin-left: auto;
    padding: 4px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.toast-frontend .toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Decorative Accent Bar */
.toast-frontend .toast-accent-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    box-shadow: 0 0 10px currentColor;
}

/* Type Specific Styles */
/* INFO */
.toast-info {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.15), inset 0 0 20px rgba(6, 182, 212, 0.05);
}

.toast-info .toast-icon {
    color: #22d3ee;
    filter: drop-shadow(0 0 5px #06b6d4);
}

.toast-info .toast-accent-bar {
    background: #06b6d4;
    color: #06b6d4;
}

.toast-info .toast-close:hover {
    border-color: #06b6d4;
}

/* SUCCESS */
.toast-success {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.15), inset 0 0 20px rgba(16, 185, 129, 0.05);
}

.toast-success .toast-icon {
    color: #34d399;
    filter: drop-shadow(0 0 5px #10b981);
}

.toast-success .toast-accent-bar {
    background: #10b981;
    color: #10b981;
}

.toast-success .toast-close:hover {
    border-color: #10b981;
}

/* ERROR */
.toast-error {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.15), inset 0 0 20px rgba(239, 68, 68, 0.05);
}

.toast-error .toast-icon {
    color: #f87171;
    filter: drop-shadow(0 0 5px #ef4444);
}

.toast-error .toast-accent-bar {
    background: #ef4444;
    color: #ef4444;
}

.toast-error .toast-close:hover {
    border-color: #ef4444;
}

/* WARNING */
.toast-warning {
    border-color: rgba(234, 179, 8, 0.3);
    box-shadow: 0 0 30px rgba(234, 179, 8, 0.15), inset 0 0 20px rgba(234, 179, 8, 0.05);
}

.toast-warning .toast-icon {
    color: #facc15;
    filter: drop-shadow(0 0 5px #eab308);
}

.toast-warning .toast-accent-bar {
    background: #eab308;
    color: #eab308;
}

.toast-warning .toast-close:hover {
    border-color: #eab308;
}

/* Banner Title Styling - Moved from Tailwind */
.store-front .banner-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 3rem;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    color: rgb(var(--color-text-main));
}

@media (min-width: 768px) {
    .store-front .banner-title {
        font-size: 4.5rem;
    }
}

/* --- Custom Select (Cyber Theme) --- */
.store-front .custom-select-trigger {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
    background-color: rgba(2, 6, 23, 0.8) !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
    font-family: var(--font-display);
    letter-spacing: 0.05em;
}

.store-front .custom-select-trigger:hover,
.store-front .custom-select-trigger:focus-within {
    border-color: rgb(var(--color-primary)) !important;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
    background-color: rgba(6, 182, 212, 0.05) !important;
}

.store-front .custom-select-options {
    background-color: rgb(var(--color-bg-surface)) !important;
    border: 1px solid rgb(var(--color-primary)) !important;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2) !important;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.store-front .custom-select-option {
    font-family: var(--font-body);
    /* Rajdhani */
}

.store-front .custom-select-option:hover {
    background-color: rgba(6, 182, 212, 0.1) !important;
    padding-left: 1.5rem !important;
    /* Slide effect */
    color: rgb(var(--color-primary)) !important;
}

/* --- Animations for Custom Select --- */
@keyframes slide-up {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slide-up 0.3s ease-out forwards;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.2s ease-out forwards;
}

/* --- Login Buttons (Cyber Theme) --- */
.btn-system-login {
    background-color: rgb(var(--color-primary));
    color: rgb(var(--color-bg-main));
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
    border: none;
}

.btn-system-login:hover {
    background-color: rgb(var(--color-primary-glow));
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.6);
}

.btn-line {
    background-color: #06C755 !important;
    color: #ffffff !important;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    box-shadow: 0 0 20px rgba(6, 199, 85, 0.3);
    border: none;
}

.btn-line:hover {
    background-color: #05b34c !important;
    box-shadow: 0 0 30px rgba(6, 199, 85, 0.5);
}

.writing-mode-vertical {
    writing-mode: vertical-rl;
    text-orientation: upright;
}

.clip-path-ribbon-bottom {
    clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
}