/* 元宇宙特殊按鈕樣式 */
.neon-button.special {
    background: linear-gradient(45deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
    position: relative;
    overflow: hidden;
}

.neon-button.special::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.neon-button.special:hover::before {
    transform: translateX(100%);
}

.neon-button.special .button-icon {
    animation: rotate 2s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 會員功能樣式 */

/* 我的會藉模態框 */
.membership-modal .modal-content {
    max-width: 600px;
    width: 90%;
}

.membership-tabs {
    display: flex;
    border-bottom: 2px solid #333;
    margin-bottom: 20px;
}

.membership-tab {
    background: transparent;
    border: none;
    color: #888;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    flex: 1;
}

.membership-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.membership-tab.active {
    color: var(--neon-cyan);
    border-bottom-color: var(--neon-cyan);
}

.membership-tab-content {
    display: none;
}

.membership-tab-content.active {
    display: block;
}

/* 儀表板樣式 */
.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-profile-card,
.points-stats-card,
.marbles-stats-card {
    background: var(--bg-card);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
}

.user-profile-card h3,
.points-stats-card h3,
.marbles-stats-card h3 {
    color: var(--neon-cyan);
    margin-bottom: 15px;
    font-size: 16px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    color: var(--text-muted);
    font-size: 14px;
}

.info-value {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    color: var(--neon-cyan);
    font-size: 18px;
    font-weight: bold;
}

/* 改密碼表單 */
.password-section {
    padding: 20px 0;
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* 霓虹按鈕樣式增強 */
.neon-button.accent {
    background: linear-gradient(45deg, var(--neon-purple), var(--neon-pink));
    box-shadow: var(--glow-size) var(--neon-purple);
}

.neon-button.accent:hover {
    box-shadow: var(--glow-intense) var(--neon-purple);
}

/* 港式霓虹燈風格 CSS - Hong Kong Neon Style */

:root {
    /* 霓虹色彩調色板 */
    --neon-pink: #ff00ff;
    --neon-cyan: #00ffff;
    --neon-green: #00ff00;
    --neon-yellow: #ffff00;
    --neon-orange: #ff8000;
    --neon-purple: #8000ff;
    --neon-red: #ff0040;
    --neon-blue: #0080ff;
    
    /* 主要背景色 */
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-input: #2a2a2a;
    
    /* 文字顏色 */
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    
    /* 陰影和光暈 */
    --glow-size: 0 0 20px;
    --glow-intense: 0 0 30px;
    --shadow-3d: 0 4px 8px rgba(0,0,0,0.3);
}

/* 全局樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 確保所有元素都使用 border-box */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', 'PingFang TC', 'Hiragino Sans GB', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 50%, #16213e 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 動態背景效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(0, 255, 0, 0.05) 0%, transparent 50%);
    animation: backgroundPulse 10s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -1;
}

@keyframes backgroundPulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* 容器樣式 */
.neon-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0px;
    position: relative;
    z-index: 1;
}

/* 頁面樣式 */
.page {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

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

/* 霓虹標題 */
.neon-header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 40px;
}

.neon-title {
    font-size: 4rem;
    font-weight: bold;
    color: var(--neon-pink);
    text-shadow: 
        var(--glow-intense) var(--neon-pink),
        var(--glow-size) var(--neon-cyan);
    animation: neonFlicker 3s ease-in-out infinite alternate;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

.neon-subtitle {
    font-weight: bold;
    font-size: 1.8rem;
    color: var(--neon-cyan);
    text-shadow: var(--glow-size) var(--neon-cyan);
    letter-spacing: 0.5em;
    opacity: 0.91;
    animation: subtleGlow 2s ease-in-out infinite alternate;
}

@keyframes neonFlicker {
    0%, 50%, 100% { 
        text-shadow: 
            var(--glow-intense) var(--neon-pink),
            var(--glow-size) var(--neon-cyan);
    }
    25%, 75% { 
        text-shadow: 
            0 0 10px var(--neon-pink),
            0 0 5px var(--neon-cyan);
    }
}

@keyframes subtleGlow {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

/* 霓虹文字效果 */
.neon-text {
    color: var(--neon-cyan);
    text-shadow: var(--glow-size) var(--neon-cyan);
    font-weight: bold;
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from { text-shadow: var(--glow-size) var(--neon-cyan); }
    to { text-shadow: var(--glow-intense) var(--neon-cyan); }
}

/* 卡片樣式 */
.neon-card {
    background: linear-gradient(145deg, var(--bg-card), #252525);
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 20px;
    position: relative;
    box-shadow: 
        var(--shadow-3d),
        var(--glow-size) var(--neon-cyan);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.neon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-cyan), var(--neon-green), var(--neon-pink));
    background-size: 300% 300%;
    border-radius: 15px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask-composite: xor;
    animation: gradient-border 6s linear infinite;
    z-index: -1;
}

/* 按鈕樣式 */
.neon-button {
    background: linear-gradient(145deg, #333, #555);
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 120px;
    box-shadow: var(--shadow-3d);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    overflow: hidden;
}

.neon-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.neon-button:hover::before {
    left: 100%;
}

.neon-button.primary {
    background: linear-gradient(145deg, #ff006e, #8338ec);
    box-shadow: 
        var(--shadow-3d),
        var(--glow-size) var(--neon-pink);
}

.neon-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0,0,0,0.4),
        var(--glow-intense) var(--neon-pink);
}

.neon-button.secondary {
    background: linear-gradient(145deg, #06ffa5, #00d4aa);
    box-shadow: 
        var(--shadow-3d),
        var(--glow-size) var(--neon-cyan);
}

.neon-button.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0,0,0,0.4),
        var(--glow-intense) var(--neon-cyan);
}

.neon-button.small {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-width: 80px;
}

.neon-button.large {
    padding: 20px 40px;
    font-size: 1.2rem;
    min-width: 200px;
}

.neon-button.tiny {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-width: 60px;
    border-radius: 8px;
}

.neon-button:disabled,
.neon-button.disabled {
    background: linear-gradient(145deg, #666, #888);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.neon-button.danger {
    background: linear-gradient(145deg, #ff006e, #ff4081);
    box-shadow: 
        var(--shadow-3d),
        var(--glow-size) var(--neon-red);
}

/* 輸入框樣式 */
.neon-input, .neon-textarea, .neon-select {
    background: var(--bg-input);
    border: 2px solid #444;
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 16px; /* 防止 iOS 自動放大 */
    width: 100%;
    transition: all 0.3s ease;
    font-family: inherit;
}



.neon-input:focus, .neon-textarea:focus, .neon-select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 
        0 0 0 3px rgba(0, 255, 255, 0.1),
        var(--glow-size) var(--neon-cyan);
    background: #333;
}

.neon-textarea {
    resize: vertical;
    min-height: 80px;
}

/* 輸入組樣式 */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--neon-cyan);
    font-weight: bold;
    text-shadow: 0 0 10px var(--neon-cyan);
}

/* 表單行樣式 */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .input-group {
    flex: 1;
}

/* 認證頁面樣式 */
/* === 美化後的登錄界面樣式 === */
.auth-background {
    min-height: 100vh;
    background: radial-gradient(ellipse at center, 
        rgba(0, 255, 255, 0.1) 0%, 
        rgba(255, 0, 255, 0.05) 30%, 
        rgba(0, 0, 0, 0.9) 70%);
    position: relative;
    overflow: hidden;
}

.auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    /*z-index: 2;*/
}

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

.brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 4rem;
    animation: pulse-star 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 255, 0, 0.8));
}

@keyframes pulse-star {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.brand-title {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink), var(--neon-green));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    margin: 0;
}

.brand-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    letter-spacing: 2px;
    margin-top: 5px;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.95), rgba(40, 40, 60, 0.85));
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    backdrop-filter: blur(15px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 255, 255, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink), var(--neon-green), var(--neon-cyan));
    background-size: 300% 300%;
    border-radius: 20px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: gradient-border 4s linear infinite;
    z-index: -1;
}

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

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

.auth-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.4;
}

.form-section {
    margin-bottom: 30px;
}

.input-container {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    z-index: 3;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.6));
}

.neon-input.enhanced {
    width: 100%;
    padding: 18px 20px 18px 55px;
    background: rgba(10, 10, 20, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 16px; /* 防止 iOS 自動放大 */
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.neon-input.enhanced:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.4),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    transform: translateY(-2px);
}

.neon-input.enhanced::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
    transition: width 0.3s ease;
    border-radius: 1px;
}

.neon-input.enhanced:focus + .input-border {
    width: 100%;
}

.form-actions {
    margin-bottom: 30px;
}

.neon-button.enhanced {
    width: 100%;
    padding: 18px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.neon-button.enhanced:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(0, 255, 255, 0.4),
        0 0 40px rgba(0, 255, 255, 0.3);
}

.neon-button.enhanced:focus {
    outline: none !important;
    transform: none !important;
    scale: 1 !important;
    box-shadow: 
        0 0 0 3px rgba(0, 255, 255, 0.4),
        0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.neon-button.enhanced:focus:not(:hover) {
    transform: none !important;
    scale: 1 !important;
}

.neon-button.enhanced .button-icon {
    margin-right: 10px;
    font-size: 1.2rem;
    filter: drop-shadow(0 0 10px currentColor);
}

.button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.6s ease;
}

.neon-button.enhanced:hover .button-glow {
    left: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.feature-highlight {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-top: 20px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
}

.feature-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.6));
}

.feature-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

/* 背景裝飾 */
.auth-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.neon-circle {
    position: absolute;
    border: 2px solid;
    border-radius: 50%;
    opacity: 0.3;
    animation: rotate 20s linear infinite;
}

.circle-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    right: 10%;
    border-color: var(--neon-cyan);
    animation-duration: 25s;
}

.circle-2 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 15%;
    border-color: var(--neon-pink);
    animation-duration: 30s;
    animation-direction: reverse;
}

.circle-3 {
    width: 100px;
    height: 100px;
    top: 30%;
    left: 10%;
    border-color: var(--neon-green);
    animation-duration: 35s;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.particle {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 10px currentColor);
}

.particle-1 {
    top: 15%;
    left: 20%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.particle-2 {
    top: 60%;
    right: 25%;
    animation-delay: 2s;
    animation-duration: 7s;
}

.particle-3 {
    bottom: 30%;
    left: 30%;
    animation-delay: 4s;
    animation-duration: 9s;
}

.particle-4 {
    top: 40%;
    right: 15%;
    animation-delay: 1s;
    animation-duration: 6s;
}

.particle-5 {
    bottom: 15%;
    right: 40%;
    animation-delay: 3s;
    animation-duration: 8s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .auth-card {
        /* max-width: 350px; */
        padding: 30px 25px;
        margin: 10px;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .logo-icon {
        font-size: 3rem;
    }
    
    .feature-highlight {
        flex-direction: column;
        gap: 10px;
    }
    
    .feature-item {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .neon-circle {
        display: none;
    }
    
    .particle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 15px;
    }
    
    .auth-card {
        padding: 25px 20px;
    }
    
    .brand-title {
        font-size: 1.8rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .neon-input.enhanced {
        padding: 15px 18px 15px 50px;
    }
    
    .neon-button.enhanced {
        padding: 15px 25px;
        font-size: 1rem;
    }
}

/* === 優化後的主頁樣式 === */
.main-header {
    max-width: 888px;
    margin: auto;
}

.user-info-card {
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.95), rgba(40, 40, 60, 0.85));
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 25px;
    position: relative;
    backdrop-filter: blur(15px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 255, 255, 0.15),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.user-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink), var(--neon-green), var(--neon-cyan));
    background-size: 300% 300%;
    border-radius: 20px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: gradient-border 6s linear infinite;
    z-index: -1;
    opacity: 0.8;
}

/* 用戶歡迎區域 */
.user-welcome {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.welcome-icon {
    font-size: 2.5rem;
    animation: wave 2s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(255, 193, 7, 0.8));
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
}

.welcome-text {
    flex: 1;
}

.user-greeting {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-phone {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-weight: 300;
}

/* 積分顯示區域 */
.points-display {
    margin-bottom: 20px;
}

.points-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.points-container.clickable {
    cursor: pointer;
}

.points-container.clickable:hover {
    background: rgba(0, 255, 255, 0.15);
    border-color: rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 255, 255, 0.3),
        var(--glow-size) var(--neon-cyan);
}

.points-container.clickable::after {
    
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.points-container.clickable:hover::after {
    opacity: 1;
}

.points-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 255, 255, 0.2), 
        transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.points-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.8));
    animation: float 3s ease-in-out infinite;
}

.points-info {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.points-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.points-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
}

/* 用戶操作區域 */
.user-actions {
    display: flex;
    justify-content: center;
}

.logout-btn.outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.logout-btn.outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    transform: translateY(-2px);
}

/* 主菜單樣式 */
.main-menu {
    text-align: center;
}

.menu-title {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.8rem;
    margin: 0 0 8px 0;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink), var(--neon-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-weight: 300;
}

.menu-buttons {
    display: flex;
    gap: 15px;
   /* max-width: 600px; */
    margin: 0 auto;
}

.neon-button.large.enhanced {
    padding: 20px 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.9), rgba(40, 40, 60, 0.8));
    border: 2px solid transparent;
    flex: 1;
}

.neon-button.large.enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink));
    border-radius: 15px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
    opacity: 0.8;
}

.neon-button.large.enhanced:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(0, 255, 255, 0.4);
}

.neon-button.large.enhanced:focus {
    outline: none !important;
    transform: none !important;
    scale: 1 !important;
    box-shadow: 
        0 0 0 3px rgba(0, 255, 255, 0.4),
        0 6px 20px rgba(0, 0, 0, 0.2) !important;
}

.neon-button.large.enhanced:focus:not(:hover) {
    transform: none !important;
    scale: 1 !important;
}

/* ========== 全局按鈕焦點狀態修復 ========== */
/* 防止所有按鈕在頁面載入時自動放大（包括內聯樣式按鈕） */
button:focus:not(:hover):not(:active),
input[type="button"]:focus:not(:hover):not(:active),
input[type="submit"]:focus:not(:hover):not(:active) {
    transform: none !important;
    scale: 1 !important;
    outline: 2px solid rgba(0, 255, 255, 0.5) !important;
    outline-offset: 2px !important;
}

/* 特殊處理第一個按鈕，防止頁面載入時自動聚焦放大 */
.neon-button.large.enhanced:first-child:focus:not(:hover):not(:active),
button:first-child:focus:not(:hover):not(:active),
.menu-buttons button:first-child:focus:not(:hover):not(:active) {
    transform: none !important;
    scale: 1 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3), 0 0 0 2px rgba(0, 255, 255, 0.5) !important;
}

/* 確保所有按鈕的初始狀態正確 */
.neon-button, .neon-button.large, .neon-button.enhanced, .neon-button.large.enhanced,
button, input[type="button"], input[type="submit"] {
    transform: none;
    scale: 1;
    transition: all 0.3s ease;
}

/* 只在hover時允許變換效果 */
.neon-button:hover, .neon-button.large:hover, .neon-button.enhanced:hover,
button:hover {
    transform: translateY(-2px) scale(1.02);
}

/* Meta系統快速出價按鈕專用修復 */
div[style*="grid-template-columns"] button {
    transform: none !important;
    scale: 1 !important;
    transition: all 0.3s ease !important;
}

div[style*="grid-template-columns"] button:hover {
    transform: translateY(-2px) scale(1.02) !important;
}

div[style*="grid-template-columns"] button:focus:not(:hover) {
    transform: none !important;
    scale: 1 !important;
    outline: 2px solid rgba(0, 255, 255, 0.5) !important;
    outline-offset: 2px !important;
}

/* ========== 全局CSS統一修復 ========== */
/* 防止任何系統的按鈕自動聚焦放大 */
*, *:before, *:after {
    box-sizing: border-box;
}

/* 全局按鈕焦點狀態統一 */
button[style], 
input[type="button"][style], 
input[type="submit"][style],
.meta-container button,
#meta-world-container button {
    transform: none !important;
    scale: 1 !important;
}

button[style]:focus:not(:hover):not(:active), 
input[type="button"][style]:focus:not(:hover):not(:active), 
input[type="submit"][style]:focus:not(:hover):not(:active),
.meta-container button:focus:not(:hover):not(:active),
#meta-world-container button:focus:not(:hover):not(:active) {
    transform: none !important;
    scale: 1 !important;
    outline: 2px solid rgba(0, 255, 255, 0.5) !important;
    outline-offset: 2px !important;
}

/* 統一hover效果 */
button[style]:hover, 
.meta-container button:hover,
#meta-world-container button:hover {
    transform: translateY(-2px) scale(1.02) !important;
}

/* 確保第一個按鈕不會在頁面載入時被自動放大 */
button:first-of-type:focus:not(:hover):not(:active) {
    transform: none !important;
    scale: 1 !important;
}

/* ========== 終極修復：覆蓋所有可能的focus樣式衝突 ========== */
/* 針對所有可能的按鈕類型進行統一修復 */
.neon-button:focus,
.neon-button.enhanced:focus,
.neon-button.large:focus,
.neon-button.primary:focus,
.neon-button.secondary:focus,
.neon-button.accent:focus,
.neon-button.large.enhanced:focus,
.neon-button.large.primary:focus,
.neon-button.large.secondary:focus,
.neon-button.large.accent:focus,
.neon-button.large.primary.enhanced:focus,
.neon-button.large.secondary.enhanced:focus,
.neon-button.large.accent.enhanced:focus,
button:focus {
    transform: none !important;
    scale: 1 !important;
    outline: none !important;
}

/* 特別針對會員功能按鈕 */
.menu-buttons .neon-button:focus,
.menu-buttons button:focus,
button[onclick*="showMembershipModal"]:focus,
button[onclick*="showScanPage"]:focus,
button[onclick*="showGiftStore"]:focus,
button[onclick*="showMetaverse"]:focus {
    transform: none !important;
    scale: 1 !important;
    outline: 2px solid rgba(0, 255, 255, 0.5) !important;
    outline-offset: 2px !important;
}

/* 確保hover效果正常 */
.neon-button:hover,
.neon-button.enhanced:hover,
.neon-button.large:hover,
.neon-button.large.enhanced:hover {
    transform: translateY(-2px) scale(1.02) !important;
}

.neon-button.large.enhanced:hover {
    transform: translateY(-5px) scale(1.02) !important;
}

.neon-button.large.enhanced .button-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 15px currentColor);
    animation: float 4s ease-in-out infinite;
}

.neon-button.large.enhanced .button-text {
    font-size: 1.1rem;
    font-weight: 600;
}

.neon-button.large.enhanced .button-subtitle {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 300;
}

.neon-button.large.enhanced .button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.8s ease;
}

.neon-button.large.enhanced:hover .button-glow {
    left: 100%;
}

.neon-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 25px;
    background: linear-gradient(145deg, var(--bg-card), #2a2a2a);
    border-radius: 10px;
    border: 1px solid var(--neon-cyan);
    box-shadow: var(--glow-size) var(--neon-cyan);
}

.points-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.points-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: var(--glow-size) var(--neon-green);
}

.main-menu {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    padding: 40px 0;
}

.button-icon {
    font-size: 1.5rem;
}

/* 掃描頁面樣式 */
.scan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-top: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.scan-title {
    color: var(--neon-yellow);
    text-shadow: var(--glow-size) var(--neon-yellow);
    font-size: 1.5rem;
}

.scan-container {
    position: relative;
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-3d);
}

.qr-scanner {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: #000;
}

.scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scan-frame {
    width: 200px;
    height: 200px;
    border: 3px solid var(--neon-cyan);
    border-radius: 15px;
    box-shadow: 
        inset var(--glow-size) var(--neon-cyan),
        var(--glow-size) var(--neon-cyan);
    animation: scanPulse 2s ease-in-out infinite;
}

@keyframes scanPulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.scan-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    flex: 1;
    margin: 0 10px;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: var(--glow-size) var(--neon-green);
}

/* 掃描結果樣式 */
.scan-result {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scan-success, .scan-error {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.scan-success.show, .scan-error.show {
    opacity: 1;
    transform: translateY(0);
}

.scan-success {
    background: linear-gradient(145deg, rgba(0, 255, 0, 0.2), rgba(0, 255, 0, 0.1));
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
}

.scan-error {
    background: linear-gradient(145deg, rgba(255, 0, 64, 0.2), rgba(255, 0, 64, 0.1));
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
}

.success-icon, .error-icon {
    font-size: 1.5rem;
    font-weight: bold;
}

/* 禮品城頁面樣式 */
.store-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    padding-top: 20px;
    padding-bottom: 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-radius: 20px;
    border: 2px solid var(--neon-cyan);
    box-shadow: 
        var(--glow-size) var(--neon-cyan),
        inset 0 2px 10px rgba(255, 165, 0, 0.1);
    position: relative;
    overflow: hidden;
    gap: 40px;
}



.store-title-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.store-title {
    color: var(--neon-cyan);
    text-shadow: 
        var(--glow-size) var(--neon-orange),
        0 0 20px rgba(255, 165, 0, 0.6);
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
    letter-spacing: 2px;
    position: relative;
}

.store-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), transparent);
    border-radius: 2px;
}





.points-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px var(--neon-yellow));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.points-text {
    color: var(--text-primary);
    font-weight: 500;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.points-amount {
    color: var(--neon-green);
    font-weight: bold;
    text-shadow: 
        var(--glow-size) var(--neon-green),
        0 0 15px rgba(0, 255, 0, 0.6);
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

/* 用戶積分顯示區域 */
.user-points-display {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.points-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px 35px;
    background: linear-gradient(145deg, var(--bg-card), #2a2a2a);
    border: 2px solid var(--neon-green);
    border-radius: 15px;
    box-shadow: 
        var(--shadow-3d),
        var(--glow-size) var(--neon-green);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.points-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan), var(--neon-purple));
    animation: progressFlow 3s ease-in-out infinite;
}

.points-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.4),
        var(--glow-intense) var(--neon-green);
}

.points-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px var(--neon-yellow));
    animation: float 3s ease-in-out infinite;
}

.points-info {
    text-align: left;
}

.points-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.points-value {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: var(--glow-size) var(--neon-green);
    font-family: 'Courier New', monospace;
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
}

/* 禮品城內容區域 */
.store-content {
    min-height: 400px;
}



/* 商品網格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* 手機版商品網格優化 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }
}


.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
    z-index: -1;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card:hover::before {
    opacity: 0.3;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 15px 30px rgba(0,0,0,0.5),
        var(--glow-intense) var(--neon-cyan);
}

.product-card.unavailable {
    cursor: not-allowed;
}

.product-card.unavailable:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 15px 30px rgba(0,0,0,0.5),
        var(--glow-intense) var(--neon-red);
}

/* 商品圖片容器 */
.product-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* 影片樣式 */
.product-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.detail-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-card:hover .product-image video {
    transform: scale(1.1);
}

.product-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    color: var(--text-muted);
}

.no-image-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.no-image-text {
    font-size: 0.9rem;
}

/* 商品狀態覆蓋層 */
.product-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.product-status {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-card:not(.unavailable) .product-status {
    background: linear-gradient(145deg, rgba(0, 255, 0, 0.9), rgba(0, 200, 0, 0.7));
    color: white;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.8);
    border: 1px solid rgba(0, 255, 0, 0.4);
    animation: glow-green 2s infinite alternate;
}

@keyframes glow-green {
    0% { box-shadow: 0 0 5px rgba(0, 255, 0, 0.5); }
    100% { box-shadow: 0 0 15px rgba(0, 255, 0, 0.8); }
}

.product-card.unavailable .product-status {
    background: linear-gradient(145deg, rgba(255, 0, 64, 0.9), rgba(200, 0, 50, 0.7));
    color: white;
    text-shadow: 0 0 8px rgba(255, 0, 64, 0.8);
    border: 1px solid rgba(255, 0, 64, 0.4);
    animation: glow-red 2s infinite alternate;
}

@keyframes glow-red {
    0% { box-shadow: 0 0 5px rgba(255, 0, 64, 0.5); }
    100% { box-shadow: 0 0 15px rgba(255, 0, 64, 0.8); }
}

/* 商品信息區域 */
.product-info {
    padding: 20px;
}

.product-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--neon-cyan);
    text-shadow: var(--glow-size) var(--neon-cyan);
    margin-bottom: 12px;
    line-height: 1.3;
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 商品價格和庫存 */
.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.price-amount {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: var(--glow-size) var(--neon-green);
    font-family: 'Courier New', monospace;
}

.price-unit {
    font-size: 1rem;
    color: var(--text-secondary);
}

.product-stock {
    text-align: right;
}

.stock-text {
    font-size: 0.9rem;
    color: var(--neon-yellow);
    font-weight: 500;
}

/* 商品按鈕 */

.gift-item {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gift-item:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.4),
        var(--glow-size) var(--neon-cyan);
}

.product-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gift-item:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 0 5px;
}

.product-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--neon-cyan);
    margin-bottom: 10px;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.product-points {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.points-required {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: var(--glow-size) var(--neon-green);
}

.points-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.product-stock {
    font-size: 0.8rem;
}

.stock-count {
    color: var(--neon-yellow);
}

.out-of-stock .stock-count {
    color: var(--neon-red);
}

.exchange-btn {
    width: 100%;
    margin-top: 10px;
}

/* 模態框樣式 */

.neon-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.neon-modal.show {
    display: flex;
    opacity: 1;
}

/* 確保 membership-modal 的 z-index 高於 meta-world-container */
#membership-modal {
    z-index: 15000 !important;
}

#membership-modal.show {
    z-index: 15000 !important;
    display: flex !important;
}

body.modal-open {
    overflow: hidden;
}

.modal-content {
    background: linear-gradient(145deg, var(--bg-card), #2a2a2a);
    border-radius: 15px;
    padding: 30px;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--neon-cyan);
    box-shadow: 
        var(--shadow-3d),
        var(--glow-size) var(--neon-cyan);
    box-sizing: border-box;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* 安全事件 UI 優化 */
.security-filter-bar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 12px;
}
.security-filter-bar .filter-item { min-width: 140px; }
.security-filter-bar .filter-item.grow { flex: 1; }
.security-events-table .badge { padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.security-events-table .badge-success { background: rgba(0,200,120,.15); color: #00c878; }
.security-events-table .badge-fail { background: rgba(255,80,80,.15); color: #ff5050; }
.security-events-table .badge-blocked { background: rgba(255,160,0,.15); color: #ffa000; }
.security-events-table .message-pre {
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.4;
    background: rgba(255,255,255,.04);
    padding: 8px;
    border-radius: 6px;
}

/* 推薦獎勵記錄樣式 */
.referral-rewards-table-container {
    margin-top: 12px;
}

.referral-rewards-table .reward-type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.referral-rewards-table .reward-type-badge.level1 {
    background: rgba(0, 200, 120, 0.15);
    color: #00c878;
    border: 1px solid rgba(0, 200, 120, 0.3);
}

.referral-rewards-table .reward-type-badge.level2 {
    background: rgba(0, 150, 255, 0.15);
    color: #0096ff;
    border: 1px solid rgba(0, 150, 255, 0.3);
}

.referral-rewards-table .reward-amount.positive {
    color: #00c878;
    font-weight: 600;
}

.referral-rewards-table .reward-reason {
    font-size: 13px;
    opacity: 0.9;
}

.referral-reward-row {
    background: rgba(255, 215, 0, 0.05);
}

.referral-reward-row:hover {
    background: rgba(255, 215, 0, 0.1);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--neon-red);
    text-shadow: var(--glow-size) var(--neon-red);
}

/* 圖片上傳樣式 */
.image-upload-section {
    margin-bottom: 15px;
    padding: 20px;
    border: 2px dashed rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(0, 255, 255, 0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.image-upload-section:hover {
    border-color: rgba(0, 255, 255, 0.5);
    background: rgba(0, 255, 255, 0.08);
}

.file-input {
    display: none;
}

.file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.file-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 255, 255, 0.3),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
}

.upload-info {
    margin-top: 8px;
}

.upload-info small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.image-url-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.image-url-section .input-note {
    margin-top: 5px;
    display: block;
}

/* 商品詳情樣式 */
.product-detail {
    max-width: 100%;
}

.product-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.product-image-large {
    flex: none;
    width: 150px;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
}

.product-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-detail {
    flex: 1;
}

.product-name-large {
    font-size: 1.4rem;
    color: var(--neon-cyan);
    margin-bottom: 15px;
    text-shadow: var(--glow-size) var(--neon-cyan);
}

.product-points-large {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 15px;
}

.points-required-large {
    font-size: 2rem;
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: var(--glow-size) var(--neon-green);
}

.points-label-large {
    font-size: 1rem;
    color: var(--text-secondary);
}



.current-points {
    color: var(--text-secondary);
}

.after-exchange {
    color: var(--neon-yellow);
}

/* 库存状态样式 */
.stock-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.stock-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stock-value {
    font-weight: bold;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 6px;
}

.stock-value.in-stock {
    color: var(--neon-green);
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

.stock-value.out-of-stock {
    color: var(--neon-red);
    background: rgba(255, 0, 64, 0.1);
    border: 1px solid rgba(255, 0, 64, 0.3);
    text-shadow: 0 0 8px rgba(255, 0, 64, 0.5);
}

/* 积分记录模态框样式 */
.points-history-section {
    max-height: 60vh;
    overflow-y: auto;
}

.history-section {
    margin-bottom: 30px;
}

.history-title {
    color: var(--neon-cyan);
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-shadow: var(--glow-size) var(--neon-cyan);
}

.qr-history-table-container,
.exchange-history-table-container {
    background: rgba(0, 20, 40, 0.4);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 255, 0.2);
    max-height: 200px;
    overflow-y: auto;
}

.qr-history-table,
.exchange-history-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.qr-history-table th,
.qr-history-table td,
.exchange-history-table th,
.exchange-history-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
}

.qr-history-table th,
.exchange-history-table th {
    background: rgba(0, 255, 255, 0.1);
    color: #00ffff;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* 移除QR码样式，因为不再显示QR码 */

.points-earned {
    color: var(--neon-green);
    font-weight: bold;
}

.points-spent {
    color: var(--neon-red);
    font-weight: bold;
}

.product-name {
    color: var(--neon-cyan);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-data {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 20px;
}

.product-description-full {
    margin-bottom: 25px;
}

.product-description-full h4 {
    color: var(--neon-orange);
    margin-bottom: 10px;
}

.product-description-full p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 交付選項樣式 */
.delivery-options {
    margin-bottom: 25px;
}

.delivery-options h4 {
    color: var(--neon-purple);
    margin-bottom: 15px;
    text-shadow: var(--glow-size) var(--neon-purple);
}

.option-group {
    margin-bottom: 15px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    background: var(--neon-cyan);
    box-shadow: var(--glow-size) var(--neon-cyan);
}

.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.option-text {
    color: var(--text-primary);
    font-weight: 500;
}

.sub-options {
    margin-left: 30px;
    margin-top: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--neon-cyan);
}

.delivery-note {
    color: var(--text-muted);
    margin-top: 5px;
    font-style: italic;
}

/* 操作按鈕區域 */
.exchange-actions, .modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* 消息提示樣式 */
.neon-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    z-index: 2000;
    transform: translateX(100%);
    transition: all 0.3s ease;
    min-width: 250px;
    text-align: center;
}

.neon-message.show {
    transform: translateX(0);
}

.neon-message.success {
    background: linear-gradient(145deg, rgba(0, 255, 0, 0.9), rgba(0, 200, 0, 0.8));
    border: 1px solid var(--neon-green);
    box-shadow: var(--glow-size) var(--neon-green);
}

.neon-message.error {
    background: linear-gradient(145deg, rgba(255, 0, 64, 0.9), rgba(200, 0, 50, 0.8));
    border: 1px solid var(--neon-red);
    box-shadow: var(--glow-size) var(--neon-red);
}

.neon-message.info {
    background: linear-gradient(145deg, rgba(0, 255, 255, 0.9), rgba(0, 200, 200, 0.8));
    border: 1px solid var(--neon-cyan);
    box-shadow: var(--glow-size) var(--neon-cyan);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .neon-title {
        font-size: 2.5rem;
    }
    
    .neon-subtitle {
        font-weight: bold;
        font-size: 1.2rem;
    }
    
    .neon-card {
        padding: 20px;
        margin-top: 15px;
        margin-bottom: 0px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    /* 平板版主頁優化 */
    .user-info-card {
        padding: 22px;
        margin: 0 10px;
    }
    
    .user-welcome {
        gap: 12px;
        margin-bottom: 18px;
    }
    
    .welcome-icon {
        font-size: 2.2rem;
    }
    
    .user-greeting {
        font-size: 1.3rem;
    }
    
    .points-container {
        padding: 18px;
        gap: 12px;
    }
    
    .points-icon {
        font-size: 1.9rem;
    }
    
    .points-value {
        font-size: 1.9rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .menu-buttons {
        gap: 18px;
        /* max-width: 450px; */
    }
    
    .neon-button.large.enhanced {
        padding: 20px 25px;
        gap: 15px;
    }
    
    .neon-button.large.enhanced .button-icon {
        font-size: 2.2rem;
    }
    
    .neon-button.large.enhanced .button-text {
        font-size: 1.2rem;
    }
    
    /* 手機版 store-header 優化 */
    .store-header {
        padding: 15px;
        flex-direction: column;
        justify-content: center;
        gap: 15px;
        text-align: center;
        margin: 0 10px;
        border-radius: 15px;
    }
    
    .store-title-area {
        align-items: center;
        gap: 15px;
    }
    
    .store-title {
        font-size: 1.8rem;
        text-align: center;
        letter-spacing: 1px;
    }
    
    .points-amount {
        font-size: 1.2rem;
    }
    
    .product-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .product-image-large {
        width: 200px;
        height: 200px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }
    
    .main-menu {
        padding-bottom: 150px;
    }
    
    .scan-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stat-item {
        margin: 0 5px;
        padding: 10px;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
    
    .ads-container {
        justify-content: center;
    }
    
    .ad-item {
        width: 250px;
    }
    
    .points-history-table-container {
        overflow-x: auto;
    }
    
    .points-history-table {
        min-width: 640px;
    }
    
    /* 手机端积分历史表格优化 */
    .points-history-table th,
    .points-history-table td {
        height: 60px;
        min-height: 60px;
        max-height: 60px;
        padding: 8px 10px;
        font-size: 0.85rem;
        line-height: 1.3;
        overflow: hidden;
    }
    
    .points-history-table tr {
        height: 60px;
        min-height: 60px;
        max-height: 60px;
    }
    
    .points-history-table th:nth-child(1),
    .points-history-table td:nth-child(1) {
        width: 80px;
        min-width: 80px;
        max-width: 80px;
    }
    
    .points-history-table th:nth-child(2),
    .points-history-table td:nth-child(2) {
        width: 80px;
        min-width: 80px;
        max-width: 80px;
    }
    
    .points-history-table th:nth-child(3),
    .points-history-table td:nth-child(3) {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
    }
    
    .points-history-table th:nth-child(4),
    .points-history-table td:nth-child(4) {
        width: 120px;
        min-width: 120px;
        max-width: 120px;
    }
    
    .record-type {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
    
    .record-type .type-icon {
        font-size: 1rem;
    }
    
    .record-description {
        max-width: 120px;
        max-height: none;
        -webkit-line-clamp: 3;
        font-size: 0.8rem;
        line-height: 1.2;
        word-break: break-word;
    }
    
    /* 手机端表格容器高度限制 */
    .points-history-table-container {
        max-height: 60vh;
    }
    
    /* 禮品城頁面手機版優化 - 使用新的 gift-store-filters 樣式 */
    
    /* pagination樣式已移至全局定義，避免重複 */
}

/* 2x2 網格佈局 - 手機版支援4按鈕 */
@media (max-width: 600px) {
    .menu-buttons {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        max-width: 100%;
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
        justify-items: stretch;
    }
    
    /* 當只有三個按鈕時，讓第三個按鈕居中且保持相同尺寸 */
    .menu-buttons .neon-button.large.enhanced:nth-child(3):last-child {
        grid-column: 1 / -1;
        width: calc(50% - 5px);
        margin: 0 auto;
        justify-self: center;
    }
    
    /* 分頁容器手機版樣式 */
    .pagination-container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
        gap: 10px;
        max-width: 100%;
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
        flex-wrap: wrap;
    }
    
    .pagination-container .neon-button {
        flex: 0 0 auto;
        min-width: 80px;
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .menu-buttons .neon-button.large.enhanced {
        width: 100%;
        height: auto;
        min-height: 100px;
        padding: 12px 8px !important;
        font-size: 0.85rem;
        gap: 6px;
        display: flex;
        flex-direction: column !important;
        justify-content: center;
        align-items: center;
        text-align: center;
        overflow: hidden;
        border-radius: 12px;
    }
    
    .menu-buttons .button-text {
        font-size: 0.9rem !important;
        font-weight: 600;
        line-height: 1.2;
        text-align: center;
        width: 100%;
        max-width: 100%;
    }
    
    .menu-buttons .button-subtitle {
        font-size: 0.65rem !important;
        opacity: 0.8;
        line-height: 1.1;
        text-align: center;
        width: 100%;
        max-width: 100%;
    }
    
    .menu-buttons .button-icon {
        font-size: 1.6rem !important;
        margin-bottom: 2px;
    }
}



@media (max-width: 480px) {
    .neon-container {
        padding: 0px;
    }
    
    .neon-title {
        font-size: 2rem;
    }
    
    .neon-button.large {
        padding: 15px 25px;
        font-size: 1rem;
        min-width: 150px;
    }
    
    /* 分頁按鈕超小螢幕優化 */
    .pagination-container .neon-button {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    .pagination-container .neon-button .button-text {
        font-size: 0.8rem;
    }
    
    .pagination-container .neon-button .button-subtitle {
        font-size: 0.7rem;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
        max-width: 95%;
        margin: 10px;
        box-sizing: border-box;
    }
    
    /* 手機版模態框優化 */
    .neon-modal {
        padding: 10px;
    }
    
    .modal-content.exchange-modal {
        max-width: 95%;
        width: 95%;
        padding: 15px;
    }
    
    .product-detail-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .product-detail-image {
        width: 100%;
        max-width: 200px;
        height: 200px;
        margin: 0 auto;
    }
    
    .delivery-options {
        gap: 10px;
    }
    
    .delivery-option {
        padding: 12px;
    }
    
    .pickup-details, .delivery-details {
        margin-left: 20px;
        padding: 10px;
    }
    
    .exchange-actions, .modal-actions {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
    }
    
    .exchange-actions .neon-button,
    .modal-actions .neon-button {
        flex: 1;
        min-width: 0;
    }
    
    /* 主頁響應式優化 */
    .main-header {
        margin-bottom: 30px;
    }
    
    .user-info-card {
        padding: 20px;
    }
    
    .user-welcome {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .welcome-icon {
        font-size: 2rem;
    }
    
    .user-greeting {
        font-size: 1.2rem;
    }
    
    .points-container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }
    
    .points-icon {
        font-size: 1.8rem;
    }
    
    .points-value {
        font-size: 1.8rem;
    }
    
    /* 注意：menu-buttons 的強制單行佈局在上面的 @media (max-width: 600px) 中定義 */
    /* 這裡只保留不衝突的樣式 */
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* 其他元素的column佈局 - 排除menu-buttons */
    .auth-card:not(.menu-buttons),
    .gift-grid:not(.menu-buttons) {
        flex-direction: column;
    }
    
    .neon-button.large.enhanced .button-icon {
        font-size: 2rem;
    }
    
    .neon-button.large.enhanced .button-text {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* 特殊動畫效果 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* 載入動畫 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--neon-cyan);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 滾動條樣式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(145deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(145deg, var(--neon-purple), var(--neon-pink));
}

/* 兌換模態框樣式 */
.modal-content.exchange-modal {
    max-width: 721px;
    width: 95%;
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
    padding-top: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    font-size: 1.8rem;
    margin: 0;
}

/* 商品詳情區域 */
.product-detail-section {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.product-detail-image {
    flex: none;
    width: 150px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--neon-cyan);
    box-shadow: var(--glow-size) var(--neon-cyan);
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.detail-no-image-icon {
    font-size: 4rem;
    opacity: 0.5;
}

/* 商品選項樣式 */
.product-options-display,
.exchange-options-section {
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.options-title {
    color: var(--neon-cyan);
    font-size: 1.2rem;
    margin: 0 0 15px 0;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.option-group,
.exchange-option-group {
    margin-bottom: 20px;
}

.option-group:last-child,
.exchange-option-group:last-child {
    margin-bottom: 0;
}

.option-label {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: bold;
}

.option-label .required {
    color: var(--neon-red);
    text-shadow: 0 0 10px var(--neon-red);
}

/* 選項值顯示樣式（詳情頁面） */
.option-values-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option-value-display {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.option-value-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 選項值選擇樣式（兌換頁面） */
.option-values-select {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-value-select {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    border: 2px solid rgba(0, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    min-width: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.option-value-select::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.option-value-select:hover::before {
    left: 100%;
}

.option-value-select:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    border-color: var(--neon-cyan);
}

.option-value-select.selected {
    transform: scale(1.05);
    border-color: var(--neon-cyan);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.6),
        0 0 40px rgba(0, 255, 255, 0.3);
    animation: selectedPulse 0.6s ease-out;
}

@keyframes selectedPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(0, 255, 255, 0.6);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
    }
    100% {
        transform: scale(1.05);
        box-shadow: 
            0 0 20px rgba(0, 255, 255, 0.6),
            0 0 40px rgba(0, 255, 255, 0.3);
    }
}

/* 圖片放大模態框樣式 */
.image-modal-overlay {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.image-modal {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    box-shadow: none;
}

.image-modal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.image-modal-header {
    margin-bottom: 20px;
    text-align: center;
}

.image-modal-title {
    color: var(--neon-cyan);
    font-size: 1.5rem;
    text-shadow: 0 0 10px var(--neon-cyan);
    margin: 0;
}

.image-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 80vh;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    border: 2px solid var(--neon-cyan);
    object-fit: contain;
}

/* 商品圖片點擊樣式 */
.product-image-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.product-image-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

/* 手機版觸摸優化 */
@media (max-width: 768px) {
    .product-image-clickable {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
    }
    
    .products-grid .neon-button {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
        min-height: 44px; /* 確保觸摸目標足夠大 */
    }
    
    .products-grid .neon-card {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Filter 和 Sort 按鈕觸控優化 */
    .filter-btn, .sort-btn {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
        min-height: 44px; /* 確保觸摸目標足夠大 */
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .image-modal {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .modal-image {
        max-height: 70vh;
    }
    
    .image-modal-title {
        font-size: 1.2rem;
    }
}

.product-detail-info {
    flex: 1;
}

.detail-product-name {
    font-size: 1.4rem;
    color: var(--neon-cyan);
    text-shadow: var(--glow-size) var(--neon-cyan);
    margin-bottom: 10px;
}

.detail-product-description {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.detail-price-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--neon-green);
}

.price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.price-label {
    color: var(--text-secondary);
}

.price-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: var(--glow-size) var(--neon-green);
    font-family: 'Courier New', monospace;
}

.points-comparison {
    font-size: 0.9rem;
}

.insufficient {
    color: var(--neon-red);
    font-weight: bold;
}

/* 配送區域 */
.delivery-section {
    margin-bottom: 25px;
}

.delivery-title {
    color: var(--neon-purple);
    text-shadow: var(--glow-size) var(--neon-purple);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.delivery-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.delivery-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.delivery-option:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.05);
}

.delivery-option input[type="radio"] {
    display: none;
}

.option-indicator {
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.delivery-option input[type="radio"]:checked + .option-indicator {
    background: var(--neon-cyan);
    box-shadow: var(--glow-size) var(--neon-cyan);
}

.option-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.delivery-option input[type="radio"]:checked + .option-indicator::after {
    transform: translate(-50%, -50%) scale(1);
}

.option-content {
    flex: 1;
}

.option-title {
    display: block;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.option-description {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 配送詳情 */
.pickup-details, .delivery-details {
    margin-left: 35px;
    margin-top: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--neon-cyan);
}

.delivery-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 5px;
    font-style: italic;
}

/* 不可用狀態 */
.unavailable-section {
    text-align: center;
    padding: 30px 20px;
}

.unavailable-message {
    margin-bottom: 25px;
}

.out-of-stock, .insufficient-points {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.unavailable-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.out-of-stock .unavailable-icon {
    filter: drop-shadow(0 0 10px var(--neon-red));
}

.insufficient-points .unavailable-icon {
    filter: drop-shadow(0 0 10px var(--neon-yellow));
}

.unavailable-message h4 {
    color: var(--neon-red);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.unavailable-message p {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 超小螢幕優化 */
@media (max-width: 480px) {
    .store-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    

    
    .points-icon {
        font-size: 1.5rem;
    }
    
    .points-amount {
        font-size: 1.2rem;
    }
    
    .product-card .product-name {
        font-size: 1.2rem;
    }
    
    .price-amount {
        font-size: 1.6rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 0px;
        padding: 10px 0;
    }
    
    /* 超小屏幕积分历史表格进一步优化 */
    .points-history-table {
        min-width: 380px;
    }
    
    .points-history-table th,
    .points-history-table td {
        height: 50px;
        min-height: 50px;
        max-height: 50px;
        padding: 6px 8px;
        font-size: 0.8rem;
        line-height: 1.2;
        overflow: hidden;
    }
    
    .points-history-table tr {
        height: 50px;
        min-height: 50px;
        max-height: 50px;
    }
    
    .points-history-table th:nth-child(1),
    .points-history-table td:nth-child(1) {
        width: 70px;
        min-width: 70px;
        max-width: 70px;
    }
    
    .points-history-table th:nth-child(2),
    .points-history-table td:nth-child(2) {
        width: 70px;
        min-width: 70px;
        max-width: 70px;
    }
    
    .points-history-table th:nth-child(3),
    .points-history-table td:nth-child(3) {
        width: 80px;
        min-width: 80px;
        max-width: 80px;
    }
    
    .points-history-table th:nth-child(4),
    .points-history-table td:nth-child(4) {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
    }
    
    .record-type {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }
    
    .record-type .type-icon {
        font-size: 0.9rem;
    }
    
    .record-description {
        max-width: 100px;
        -webkit-line-clamp: 2;
        font-size: 0.75rem;
        line-height: 1.1;
    }
    
    .type-icon {
        font-size: 1rem;
    }
}

/* 发送积分模态框样式 */
.send-points-section {
    padding: 20px 0;
}

/* 发送积分模态框特殊样式 */
.send-points-modal .modal-content {
    max-width: 700px;
}

.current-points-display {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    text-align: center;
}

.current-points-display .points-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-right: 10px;
}

.current-points-display .points-value {
    color: var(--neon-cyan);
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: var(--glow-size) var(--neon-cyan);
}

.send-points-form {
    margin-bottom: 20px;
}

.input-note {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.8;
}

.send-summary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-item span:first-child {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.summary-item span:last-child {
    color: var(--neon-green);
    font-weight: bold;
    text-shadow: var(--glow-size) var(--neon-green);
}

/* 手续费样式 */
.summary-item:nth-child(2) span:last-child {
    color: var(--neon-orange);
    text-shadow: var(--glow-size) var(--neon-orange);
}

.summary-item:nth-child(3) span:last-child {
    color: var(--neon-red);
    text-shadow: var(--glow-size) var(--neon-red);
}

/* 介绍人选项样式 - 低调设计 */
.referrer-option-container {
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 20, 40, 0.2);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.referrer-toggle {
    margin-bottom: 0px;
}

.referrer-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.referrer-checkbox-input {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: var(--neon-cyan);
}

.referrer-checkbox-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.referrer-input-container {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
}

.referrer-input-container .input-container {
    margin-bottom: 0;
}

.referrer-input-container .neon-input {
    font-size: 0.9rem;
    background: rgba(0, 20, 40, 0.3);
}

/* 积分流水记录表格样式 */
.points-history-table-container {
    background: rgba(0, 20, 40, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.points-history-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    background: transparent;
    table-layout: fixed;
    max-width: 100%;
    box-sizing: border-box;
}

.points-history-table th,
.points-history-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
    vertical-align: top;
    height: 60px;
    max-height: 60px;
    overflow: hidden;
}

.points-history-table th:nth-child(1),
.points-history-table td:nth-child(1) {
    width: 120px;
    min-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.points-history-table th:nth-child(2),
.points-history-table td:nth-child(2) {
    width: 120px;
    min-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.points-history-table th:nth-child(3),
.points-history-table td:nth-child(3) {
    width: 150px;
    min-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.points-history-table th:nth-child(4),
.points-history-table td:nth-child(4) {
    width: 250px;
    min-width: 250px;
}

/* 推薦獎勵：通用、可靠的 class 樣式 */
.points-history-table tr.record-referral {
    background: rgba(0, 255, 0, 0.05);
}
.points-history-table tr.record-referral .record-type,
.points-history-table tr.record-referral .record-description {
    color: var(--neon-green);
    font-weight: 500;
}

.points-history-table th {
    background: rgba(0, 255, 255, 0.1);
    color: #00ffff;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 1;
    height: 50px;
    vertical-align: middle;
}

.points-history-table tr {
    height: 60px;
    max-height: 60px;
}

.points-history-table tr:hover {
    background: rgba(0, 255, 255, 0.05);
}

.record-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    line-height: 1.4;
    word-wrap: break-word;
}

.type-icon {
    font-size: 1.2rem;
}

.record-description {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    word-wrap: break-word;
    max-height: 2.8em;
}

/* 打怪遊戲風格的傷害數值動畫 */
.damage-number {
    position: absolute;
    font-size: 2.5rem;
    font-weight: bold;
    pointer-events: none;
    z-index: 2000; /* 確保顯示在相機預覽和掃描框之上 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: damageFloat 2.5s ease-out forwards;
    white-space: nowrap;
    user-select: none;
}

.damage-number.success {
    color: #00ff88;
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 0 0 15px #00ff88, 0 0 30px #00ff88, 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 255, 136, 0.1);
    border-radius: 8px;
    padding: 0.2em 0.4em;
    border: 2px solid #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.damage-number.error {
    color: #ff4444;
    text-shadow: 0 0 15px #ff4444, 0 0 30px #ff4444, 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.damage-number.warning {
    color: #ff4444;
    text-shadow: 0 0 15px #ff4444, 0 0 30px #ff4444, 2px 2px 4px rgba(0, 0, 0, 0.8);
}

@keyframes damageFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.8);
    }
    15% {
        opacity: 1;
        transform: translateY(-20px) scale(1.3);
    }
    30% {
        opacity: 1;
        transform: translateY(-40px) scale(1.1);
    }
    60% {
        opacity: 1;
        transform: translateY(-40px) scale(1.2);
    }
    80% {
        opacity: 0.8;
        transform: translateY(-60px) scale(0.9);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0.8);
    }
}

/* 掃描結果容器 */
.scan-result {
    position: relative;
    overflow: hidden;
}

/* 客服按鈕樣式 */
.customer-service-section {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.neon-button.customer-service {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: 2px solid #25D366;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.neon-button.customer-service:hover {
    background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
    border-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(37, 211, 102, 0.4),
        0 0 30px rgba(37, 211, 102, 0.3);
}

.neon-button.customer-service:active {
    transform: translateY(0);
    box-shadow: 
        0 4px 15px rgba(37, 211, 102, 0.3),
        0 0 20px rgba(37, 211, 102, 0.2);
}

.neon-button.customer-service .button-glow {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.3) 0%, rgba(18, 140, 126, 0.3) 100%);
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.5);
}

/* 禮品目錄樣式 - 與index.php風格一致 */
/* 廢棄的 tag-filters 樣式已完全移除，避免CSS污染 */

/* 商品標籤樣式 - 與商品卡片風格一致 */
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0;
    justify-content: center;
}

.product-tag {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    /* 移除固定的 color: white，讓內聯樣式優先 */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-tag:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.4),
        0 0 10px rgba(255, 255, 255, 0.2);
}

/* 分頁樣式 - 類似points-container的可點擊特效 */
.pagination-container {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.5rem 2rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    justify-content: center;
}


.pagination:hover {
    background: rgba(0, 255, 255, 0.15);
    border-color: rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 255, 255, 0.3),
        var(--glow-size) var(--neon-cyan);
}

.pagination-btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
    white-space: nowrap;
}

.pagination-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 255, 255, 0.1);
}

.pagination-btn.active {
    background: rgba(0, 255, 255, 0.2);
    color: var(--neon-cyan);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.pagination-ellipsis {
    color: var(--neon-cyan);
    font-size: 1.4rem;
    font-weight: bold;
    padding: 0 1rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    animation: pulse 2s infinite;
}

/* 動畫效果 */

@keyframes borderGlow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* 頁面操作按鈕樣式 */
.page-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.page-actions .neon-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: fit-content;
}

.page-actions .neon-button.primary {
    order: 3; /* 主要按鈕放在最後 */
}

.page-actions .neon-button.secondary {
    order: 1; /* 次要按鈕放在前面 */
}

/* 標籤管理樣式 */
.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tag-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(42, 42, 42, 0.8) 100%);
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tag-card:hover {
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.2);
    transform: translateY(-2px);
}

.tag-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tag-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.tag-name {
    color: var(--neon-cyan);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.tag-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    min-height: 2.8rem;
}

.tag-stats {
    margin-bottom: 1.5rem;
}

.tag-product-count {
    display: inline-block;
    background: rgba(0, 255, 255, 0.1);
    color: var(--neon-cyan);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.tag-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
}

.tag-actions .neon-button {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* 標籤管理篩選器 - 使用新的 gift-store-filters 樣式 */

.tag-search, .tag-sort {
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag-search:focus, .tag-sort:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    outline: none;
}

.tag-search {
    flex: 1;
    min-width: 200px;
}

.tag-sort {
    min-width: 150px;
}

/* 成本分析報告樣式 - 重用現有樣式 */
.cost-analysis-report {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(42, 42, 42, 0.8) 100%);
    border-radius: 20px;
    border: 2px solid rgba(0, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 2rem;
    margin: 1rem 0;
}

.report-section {
    margin-bottom: 2rem;
}

.report-section h3 {
    color: var(--neon-cyan);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(0, 20, 40, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
    transform: translateY(-2px);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.table-container {
    background: rgba(0, 20, 40, 0.4);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 255, 0.2);
    max-height: 400px;
    overflow-y: auto;
}

.analysis-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.analysis-table th,
.analysis-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
}

.analysis-table th {
    background: rgba(0, 255, 255, 0.1);
    color: #00ffff;
    font-weight: 500;
    position: sticky;
    top: 0;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.analysis-table tr:hover {
    background: rgba(0, 255, 255, 0.05);
}

.analysis-table tr:last-child td {
    border-bottom: none;
}

/* 響應式設計 - 與index.php保持一致 */
@media (max-width: 768px) {
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1rem 1.5rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        min-width: 35px;
    }
    
    .pagination-ellipsis {
        font-size: 1.2rem;
        padding: 0 0.8rem;
    }
}

@media (max-width: 480px) {
    
    /* 標籤管理響應式 */
    .tags-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tag-card {
        padding: 1rem;
    }
    
    .tag-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tag-actions .neon-button {
        width: 100%;
        justify-content: center;
    }
    
    .page-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .page-actions .neon-button {
        width: 100%;
        justify-content: center;
    }
    
    /* 成本分析報告響應式 */
    .cost-analysis-report {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
    
    .analysis-table th,
    .analysis-table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .pagination {
        gap: 0.4rem;
        padding: 1rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
        min-width: 30px;
    }
}

.neon-button.customer-service .button-icon {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.neon-button.customer-service .button-text {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

    .neon-button.customer-service .button-subtitle {
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.85rem;
        text-shadow: 0 0 3px rgba(255, 255, 255, 0.2);
    }


.gift-store-filters:hover {
    border-color: rgba(0, 255, 255, 0.4);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.gift-store-filters::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink), var(--neon-green));
    animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.gift-store-filters .filter-title {
    color: var(--neon-cyan);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.gift-store-filters .filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    align-items: center;
}

.gift-store-filters .filter-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 20px;
    background: rgba(0, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    min-width: 80px;
    backdrop-filter: blur(10px);
}

.gift-store-filters .filter-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.5);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.2);
}

.gift-store-filters .filter-btn.active {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    border-color: var(--neon-cyan);
    color: white;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    transform: scale(1.05);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .gift-store-filters {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .gift-store-filters .filter-buttons {
        gap: 0.6rem;
    }
    
    .gift-store-filters .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .gift-store-filters {
        padding: 0.8rem;
    }
    
    .gift-store-filters .filter-buttons {
        gap: 0.4rem;
    }
    
    .gift-store-filters .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-width: 60px;
    }
}

/* 客服按鈕動畫效果 */
.neon-button.customer-service::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.neon-button.customer-service:hover::before {
    left: 100%;
}

/* 響應式設計 - 客服按鈕 */
@media (max-width: 768px) {
    .customer-service-section {
        margin-top: 15px;
    }
    
    .neon-button.customer-service.large {
        padding: 15px 20px;
        font-size: 0.9rem;
    }
    
    .neon-button.customer-service.large .button-icon {
        font-size: 1.5rem;
    }
    
    .neon-button.customer-service.large .button-text {
        font-size: 0.9rem;
    }
    
    .neon-button.customer-service.large .button-subtitle {
        font-size: 0.7rem;
    }
}

/* 載入指示器樣式 */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
    color: #00ffff;
    font-family: 'Arial', sans-serif;
}


.loading-phase {
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 0 10px #00ffff;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 精簡禮品商店樣式 - 重用現有元素 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* 商品卡片統一高度 - 適應按鈕位置 */
.products-grid .neon-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 360px;
    max-height: 380px;
}

/* 商品卡片內容區域 */
.products-grid .neon-card > div:first-child {
    flex-shrink: 0;
}

.products-grid .neon-card h3 {
    flex-shrink: 0;
}

.products-grid .neon-card p {
    flex: 1;
    display: flex;
    align-items: flex-start;
}

/* 商品價格庫存區域 */
.products-grid .neon-card > div:nth-last-child(2) {
    flex-shrink: 0;
    margin-top: auto;
}

/* 商品按鈕區域 */
.products-grid .neon-card button {
    flex-shrink: 0;
    margin-top: auto;
}

/* 可自動換行的分類晶片列 */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 4px 10px 4px;
    margin-bottom: 12px;
}

.filter-chips .neon-button.small {
    min-width: auto;
    padding: 8px 12px;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-chips .neon-button.small.outline {
    background: transparent;
    border: 1px solid rgba(0,255,255,0.4);
    color: var(--text-primary);
}

.filter-chips .filter-btn.active {
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0,255,255,0.4);
}

/* 分店過濾區域 - 包含按鈕和下拉選單 */
.store-filter-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 8px 0;
    padding: 8px 0;
    border-top: 1px solid rgba(0,255,255,0.2);
    border-bottom: 1px solid rgba(0,255,255,0.2);
}

.store-filter-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0,255,255,0.4);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 120px;
    max-width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: auto;
}

.store-filter-select:hover {
    border-color: #00ffff;
    box-shadow: 0 0 8px rgba(0,255,255,0.3);
}

.store-filter-select:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0,255,255,0.4);
}

.store-filter-select option {
    background: #1a1a2e;
    color: var(--text-primary);
}

/* 排序區域樣式 */
.sort-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
    padding: 4px 0;
}

.sort-section .neon-button.tiny {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.sort-section .neon-button.tiny:hover {
    border-color: rgba(0,255,255,0.6);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.sort-section .sort-btn.active {
    background: linear-gradient(145deg, rgba(0,255,255,0.2), rgba(0,255,255,0.1));
    border-color: #00ffff;
    color: #00ffff;
    box-shadow: 
        0 0 15px rgba(0,255,255,0.6),
        0 0 25px rgba(0,255,255,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-1px);
    font-weight: bold;
}

.sort-section .sort-btn.active:hover {
    background: linear-gradient(145deg, rgba(0,255,255,0.3), rgba(0,255,255,0.2));
    box-shadow: 
        0 0 20px rgba(0,255,255,0.8),
        0 0 35px rgba(0,255,255,0.4),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* 響應式設計 - 禮品商店 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .products-grid .neon-card {
        min-height: 360px;
        max-height: 383px;
    }
    
    .filter-chips {
        gap: 6px;
        padding: 4px 2px 8px 2px;
    }
    
    .filter-chips .neon-button.small {
        padding: 6px 10px;
    }
    
    .store-filter-section {
        margin: 6px 0;
        padding: 6px 0;
        gap: 6px;
    }
    
    .store-filter-select {
        min-width: 100px;
        max-width: 150px;
        font-size: 0.85rem;
    }
    
    .sort-section {
        gap: 4px;
        margin: 4px 0;
    }
    
    .sort-section .neon-button.tiny {
        padding: 4px 8px;
        font-size: 0.75rem;
        min-width: 50px;
    }
    
    .menu-buttons .neon-button.large.enhanced {
        padding: 15px 20px;
        font-size: 0.9rem;
    }
    
    .menu-buttons .neon-button.large.enhanced .button-icon {
        font-size: 1.5rem;
    }
    
    .menu-buttons .neon-button.large.enhanced .button-text {
        font-size: 0.9rem;
    }
    
    .menu-buttons .neon-button.large.enhanced .button-subtitle {
        font-size: 0.7rem;
    }
    
    /* 確保客服按鈕與主功能按鈕大小一致 */
    .customer-service-section .neon-button.large.enhanced {
        padding: 15px 20px;
        font-size: 0.9rem;
    }
    
    .customer-service-section .neon-button.large.enhanced .button-icon {
        font-size: 1.5rem;
    }
    
    .customer-service-section .neon-button.large.enhanced .button-text {
        font-size: 0.9rem;
    }
    
    .customer-service-section .neon-button.large.enhanced .button-subtitle {
        font-size: 0.7rem;
    }
}
/* 滾動容器（彈珠紀錄） */
.drag-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    cursor: grab;
    padding-bottom: 6px;
}
.drag-scroll.dragging {
    cursor: grabbing;
}
.drag-scroll::-webkit-scrollbar {
    height: 8px;
}
.drag-scroll::-webkit-scrollbar-thumb {
    background: rgba(0,255,255,0.3);
    border-radius: 4px;
}
.drag-scroll::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}
.marbles-table {
    min-width: 980px;
}

/* 彈珠走勢圖樣式 */
#marbles-chart-container {
    position: relative;
    min-height: 150px;
}

.chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 255, 255, 0.2);
    border-top: 3px solid #00ffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#marbles-chart-canvas {
    width: 100%;
    height: 150px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

#marbles-chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 10px;
}

#marbles-chart-labels span {
    color: #888;
    font-size: 12px;
}
