/* Extracted from r168.html */


        :root {
            --primary-color: rgba(255, 255, 255, 0.3);
            --primary-hover: rgba(255, 255, 255, 0.6);
            --shadow-color: rgba(255, 255, 255, 0.2);
            --bg-dark: rgba(0, 0, 0, 0.8);
            --text-light: white;
            --accent-green: #4CAF50;
            --accent-green-hover: #45a049;
            --accent-blue: #3185FC;
            --accent-red: #E84855;
            --blur-effect: blur(8px);
            --transition-speed: 0.3s;
            --border-radius-small: 4px;
            --border-radius-medium: 8px;
            --border-radius-large: 12px;
            --box-shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.2);
            --box-shadow-medium: 0 6px 16px rgba(0, 0, 0, 0.3);
            --box-shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.4);
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translate(-50%, -60%); }
            to { opacity: 1; transform: translate(-50%, -50%); }
        }

        @keyframes loadingDots {
            0%, 20% { opacity: 0; }
            50% { opacity: 1; }
            80%, 100% { opacity: 0; }
        }

        @keyframes slideInFromRight {
            from { transform: translateX(120px); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        @keyframes tutorialSlideIn {
            from { opacity: 0; transform: translateY(50px) scale(0.9); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes gentleFlicker {
            0%, 100% { 
                color: #FFD700;
                text-shadow: 0 0 15px rgba(255, 215, 0, 1.0), 0 0 25px rgba(255, 215, 0, 0.8);
                transform: scale(1.0);
            }
            50% { 
                color: #FFFFFF;
                text-shadow: 0 0 20px rgba(255, 255, 255, 1.2), 0 0 30px rgba(255, 255, 255, 0.9);
                transform: scale(1.1);
            }
        }

        @keyframes greenPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.55; }
        }


        @keyframes dialogBounce {
            0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
            50% { transform: translate(-50%, -50%) scale(1.05); }
            70% { transform: translate(-50%, -50%) scale(0.95); }
            100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
        }

        @keyframes floatingGlow {
            0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
            50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.6); }
        }


        
        .flashing-symbol {
            color: #ffffff;
            display: inline-block;
            margin-left: 5px;
        }

        .flashing-symbol .symbol-only {
            animation: gentleFlicker 3s ease-in-out infinite;
        }

        .green-dot {
            display: inline-block;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background-color: #00FF00;
            animation: greenPulse 1s ease-in-out infinite;
            will-change: opacity;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        
        html, body {
            height: 100%;
            width: 100%;
            overflow: hidden;
            position: fixed;
            top: 0;
            left: 0;
            background-color: #000;
        }
        
        body { 
            margin: 0; 
            font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', 'Helvetica Neue', 'Segoe UI', Tahoma, Arial, sans-serif;
            color: var(--text-light);
            overscroll-behavior: none;
            touch-action: none;
        }
        
        #game-container { 
            position: fixed; 
            width: 100%; 
            height: 100%; 
            top: 0;
            left: 0;
            overflow: hidden;
            touch-action: none;
        }
        
        canvas {
            display: block;
            position: absolute;
            top: 0;
            left: 0;
            touch-action: none;
        }

        .ai-news-dialog {
            position: fixed;
            top: 55%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: linear-gradient(135deg, 
                rgba(15, 25, 40, 0.96) 0%, 
                rgba(25, 35, 55, 0.96) 50%,
                rgba(35, 45, 65, 0.96) 100%);
            backdrop-filter: blur(25px) saturate(150%);
            border: 2px solid rgba(102, 126, 234, 0.4);
            border-radius: 24px;
            text-align: center;
            z-index: 1010;
            max-width: 480px;
            min-width: 400px;
            box-shadow: 
                0 30px 60px rgba(0, 0, 0, 0.6),
                0 15px 30px rgba(0, 0, 0, 0.3),
                inset 0 2px 0 rgba(255, 255, 255, 0.2),
                inset 0 -1px 0 rgba(0, 0, 0, 0.1);
            font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
            font-weight: 500;
            line-height: 1.6;
            font-size: 16px;
            animation: dialogBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            transition: opacity 0.3s ease, transform 0.3s ease;
            padding: 0;
            overflow: hidden;
        }

        .ai-news-content {
            padding: 35px 30px 25px;
            position: relative;
        }

        .ai-news-icon {
            width: 90px;
            height: 90px;
            border-radius: 50%;
            margin: 0 auto 20px;
            border: 4px solid rgba(102, 126, 234, 0.6);
            box-shadow: 
                0 6px 20px rgba(102, 126, 234, 0.4),
                0 0 30px rgba(102, 126, 234, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 36px;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(102, 126, 234, 0.05) 100%);
            animation: floatingGlow 3s ease-in-out infinite;
        }

        .ai-news-title {
            font-size: 22px;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 18px;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
            letter-spacing: 0.5px;
        }

        .ai-news-message {
            font-size: 16px;
            color: rgba(255, 255, 255, 0.92);
            line-height: 1.7;
            margin-bottom: 25px;
            text-align: left;
            padding: 20px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            border-left: 4px solid rgba(102, 126, 234, 0.7);
            position: relative;
            overflow: hidden;
        }

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

        .ai-news-buttons {
            display: flex;
            justify-content: center;
            gap: 15px;
            padding: 20px 0 10px;
            margin-top: 15px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .ai-news-btn {
            padding: 12px 24px;
            border: none;
            border-radius: 25px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            letter-spacing: 0.5px;
            position: relative;
            overflow: hidden;
            min-width: 120px;
            backdrop-filter: blur(10px);
            font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
        }

        .ai-news-btn::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;
        }

        .ai-news-btn:hover::before {
            left: 100%;
        }

        .ai-news-btn-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #ffffff;
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 
                0 8px 20px rgba(102, 126, 234, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
        }

        .ai-news-btn-primary:hover {
            transform: translateY(-2px) scale(1.02);
            box-shadow: 
                0 12px 25px rgba(102, 126, 234, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
        }

        .ai-news-btn-secondary {
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 
                0 4px 12px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }

        .ai-news-btn-secondary:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: translateY(-1px);
            color: #ffffff;
            border-color: rgba(255, 255, 255, 0.3);
        }

        .ai-news-btn:active {
            transform: translateY(0);
        }

        .ai-news-close {
            position: absolute;
            top: 15px;
            right: 15px;
            width: 40px;
            height: 40px;
            background: rgba(255, 255, 255, 0.12);
            border: 2px solid rgba(255, 255, 255, 0.25);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 20px;
            color: rgba(255, 255, 255, 0.8);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-weight: 300;
            z-index: 15;
        }

        .ai-news-close:hover {
            background: rgba(255, 100, 100, 0.25);
            border-color: rgba(255, 100, 100, 0.5);
            color: #ffffff;
            transform: rotate(90deg) scale(1.15);
            box-shadow: 0 4px 15px rgba(255, 100, 100, 0.3);
        }

        .ai-news-close:active {
            transform: rotate(90deg) scale(0.95);
        }

        .npc-greeting-dialog {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: linear-gradient(135deg, 
                rgba(15, 25, 40, 0.96) 0%, 
                rgba(25, 35, 55, 0.96) 50%,
                rgba(35, 45, 65, 0.96) 100%);
            backdrop-filter: blur(25px) saturate(150%);
            border: 2px solid rgba(255, 215, 0, 0.4);
            border-radius: 24px;
            text-align: center;
            z-index: 1010;
            max-width: 480px;
            min-width: 400px;
            box-shadow: 
                0 30px 60px rgba(0, 0, 0, 0.6),
                0 15px 30px rgba(0, 0, 0, 0.3),
                inset 0 2px 0 rgba(255, 255, 255, 0.2),
                inset 0 -1px 0 rgba(0, 0, 0, 0.1);
            font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
            font-weight: 500;
            line-height: 1.6;
            font-size: 16px;
            animation: dialogBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            transition: opacity 0.3s ease, transform 0.3s ease;
            padding: 0;
            overflow: hidden;
        }

        .npc-greeting-content {
            padding: 35px 30px 25px;
            position: relative;
        }

        .npc-avatar {
            width: 90px;
            height: 90px;
            border-radius: 50%;
            margin: 0 auto 20px;
            border: 4px solid rgba(255, 215, 0, 0.6);
            box-shadow: 
                0 6px 20px rgba(255, 215, 0, 0.4),
                0 0 30px rgba(255, 215, 0, 0.2);
            object-fit: cover;
            display: block;
            animation: floatingGlow 3s ease-in-out infinite;
        }

        .npc-greeting-title {
            font-size: 22px;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 18px;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
            letter-spacing: 0.5px;
        }

        .npc-greeting-message {
            font-size: 16px;
            color: rgba(255, 255, 255, 0.92);
            line-height: 1.7;
            margin-bottom: 25px;
            text-align: left;
            padding: 20px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            border-left: 4px solid rgba(255, 215, 0, 0.7);
            position: relative;
            overflow: hidden;
        }

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

        .npc-greeting-buttons {
            display: flex;
            justify-content: center;
            padding: 20px 0 10px;
            margin-top: 15px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .npc-invite-btn {
            background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
            color: #ffffff;
            border: none;
            padding: 12px 24px;
            border-radius: 25px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            letter-spacing: 0.5px;
            position: relative;
            overflow: hidden;
            min-width: 180px;
            backdrop-filter: blur(10px);
            box-shadow: 
                0 8px 20px rgba(76, 175, 80, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
            font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
        }

        .npc-invite-btn::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;
        }

        .npc-invite-btn:hover::before {
            left: 100%;
        }

        .npc-invite-btn:hover {
            transform: translateY(-2px) scale(1.02);
            box-shadow: 
                0 12px 25px rgba(76, 175, 80, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
        }

        .npc-invite-btn:active {
            transform: translateY(0) scale(0.98);
        }

        .npc-greeting-close {
            position: absolute;
            top: 15px;
            right: 15px;
            width: 40px;
            height: 40px;
            background: rgba(255, 255, 255, 0.12);
            border: 2px solid rgba(255, 255, 255, 0.25);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 20px;
            color: rgba(255, 255, 255, 0.8);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-weight: 300;
            z-index: 15;
        }

        .npc-greeting-close:hover {
            background: rgba(255, 100, 100, 0.25);
            border-color: rgba(255, 100, 100, 0.5);
            color: #ffffff;
            transform: rotate(90deg) scale(1.15);
            box-shadow: 0 4px 15px rgba(255, 100, 100, 0.3);
        }

        .npc-greeting-close:active {
            transform: rotate(90deg) scale(0.95);
        }

        .npc-character-indicator {
            display: inline-block;
            margin-right: 8px;
            font-size: 20px;
            filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
        }

        .greeting-dialog {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: linear-gradient(135deg, rgba(15, 25, 40, 0.95) 0%, rgba(25, 35, 55, 0.95) 100%);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            text-align: center;
            z-index: 1002;
            max-width: 500px;
            min-width: 450px;
            box-shadow: 
                0 25px 50px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
            font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
            font-weight: 500;
            line-height: 1.5;
            font-size: 16px;
            animation: fadeIn 0.3s ease-out;
            transition: opacity 0.3s ease, transform 0.3s ease;
            padding: 0;
        }

        .greeting-content {
            padding: 30px 25px 20px;
        }

        .city-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            margin: 0 auto 15px;
            border: 3px solid rgba(255, 215, 0, 0.4);
            box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
            object-fit: cover;
            display: block;
        }

        .greeting-title {
            font-size: 20px;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 15px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .city-introduction {
            font-size: 15px;
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.6;
            margin-bottom: 25px;
            text-align: left;
            padding: 15px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            border-left: 4px solid rgba(255, 215, 0, 0.6);
        }

        .greeting-buttons {
            display: flex;
            gap: 15px;
            padding: 0 25px 25px;
            justify-content: center;
        }

        .greeting-btn {
            padding: 12px 25px;
            border: none;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            letter-spacing: 0.3px;
            position: relative;
            overflow: hidden;
            min-width: 100px;
            backdrop-filter: blur(10px);
        }

        .greeting-btn::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;
        }

        .greeting-btn:hover::before {
            left: 100%;
        }

        .greeting-btn-accept {
            background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
            color: #ffffff;
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 
                0 8px 20px rgba(76, 175, 80, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
        }

        .greeting-btn-accept:hover {
            transform: translateY(-2px);
            box-shadow: 
                0 12px 25px rgba(76, 175, 80, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
        }

        .greeting-btn-decline {
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 
                0 4px 12px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }

        .greeting-btn-decline:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: translateY(-1px);
            color: #ffffff;
            border-color: rgba(255, 255, 255, 0.3);
        }

        .greeting-btn:active {
            transform: translateY(0);
        }

        .status-indicator {
            display: inline-block;
            margin-right: 8px;
            font-size: 18px;
        }

        .status-available {
            color: #4CAF50;
        }

        .status-unavailable {
            color: #ff9800;
        }

        .tutorial-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(5px);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.5s ease-out;
        }

        .tutorial-container {
            background: linear-gradient(135deg, 
                rgba(15, 25, 40, 0.98) 0%, 
                rgba(25, 35, 55, 0.98) 100%);
            backdrop-filter: blur(30px);
            border: 2px solid rgba(102, 126, 234, 0.3);
            border-radius: 20px;
            padding: 40px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            position: relative;
            box-shadow: 
                0 25px 50px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
            animation: tutorialSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .tutorial-header {
            text-align: center;
            margin-bottom: 30px;
            border-bottom: 2px solid rgba(102, 126, 234, 0.3);
            padding-bottom: 20px;
        }

        .tutorial-title {
            font-size: 28px;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 10px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
            background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .tutorial-subtitle {
            font-size: 16px;
            color: rgba(255, 255, 255, 0.8);
            font-weight: 400;
        }

        .tutorial-content {
            line-height: 1.8;
            color: rgba(255, 255, 255, 0.9);
        }

        .tutorial-section {
            margin-bottom: 25px;
            padding: 20px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            border-left: 4px solid rgba(102, 126, 234, 0.6);
        }

        .tutorial-section-title {
            font-size: 18px;
            font-weight: 600;
            color: #ffffff;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .tutorial-section-icon {
            font-size: 20px;
            width: 30px;
            height: 30px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .tutorial-text {
            font-size: 15px;
            line-height: 1.6;
            margin-bottom: 8px;
        }

        .tutorial-highlight {
            color: #4CAF50;
            font-weight: 600;
        }

        .tutorial-close-btn {
            position: absolute;
            top: 15px;
            right: 15px;
            width: 40px;
            height: 40px;
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 20px;
            color: rgba(255, 255, 255, 0.7);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-weight: 300;
            z-index: 10;
        }

        .tutorial-close-btn:hover {
            background: rgba(255, 100, 100, 0.2);
            border-color: rgba(255, 100, 100, 0.4);
            color: #ffffff;
            transform: rotate(90deg) scale(1.1);
        }

        .tutorial-footer {
            text-align: center;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .tutorial-start-btn {
            background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
            color: #ffffff;
            border: none;
            padding: 12px 30px;
            border-radius: 25px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
        }

        .tutorial-start-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
        }

        .character-info-dialog {
            position: fixed;
            top: 55%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.9);
            background: linear-gradient(135deg, 
                rgba(20, 30, 50, 0.95) 0%, 
                rgba(30, 45, 70, 0.95) 50%,
                rgba(25, 35, 60, 0.95) 100%);
            backdrop-filter: blur(25px) saturate(150%);
            border: 2px solid rgba(255, 255, 255, 0.15);
            border-radius: 24px;
            padding: 0;
            max-width: 420px;
            min-width: 360px;
            box-shadow: 
                0 30px 60px rgba(0, 0, 0, 0.4),
                0 15px 30px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.2),
                inset 0 -1px 0 rgba(0, 0, 0, 0.1);
            font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
            z-index: 1002;
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            will-change: opacity, transform;
        }

        .character-dialog-show {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }

        .character-dialog-hide {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.85);
        }

        .character-content {
            padding: 35px 30px 45px;
            text-align: center;
            overflow: auto; 
            max-height: 70vh; 
        }

        .character-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            margin: 0 auto 20px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            object-fit: cover;
            display: block;
        }

        .character-icon-container {
            margin-bottom: 20px;
            display: flex;
            justify-content: center;
        }

        .character-icon {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 36px;
            box-shadow: 
                0 8px 20px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
            position: relative;
            overflow: hidden;
        }

        .character-icon::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            animation: shimmer 3s ease-in-out infinite;
        }

        .character-title {
            font-size: 22px;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 25px;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
            letter-spacing: 0.5px;
        }

        .character-message {
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.6;
            text-align: left;
        }

        .info-section {
            margin-bottom: 20px;
            padding: 15px 20px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            border-left: 4px solid rgba(100, 200, 255, 0.6);
            transition: all 0.3s ease;
        }

        .info-section:hover {
            background: rgba(255, 255, 255, 0.12);
            border-left-color: rgba(100, 200, 255, 0.8);
            transform: translateX(3px);
        }

        .info-section:last-child {
            margin-bottom: 0;
        }

        .info-label {
            font-size: 13px;
            font-weight: 600;
            color: rgba(100, 200, 255, 0.9);
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 8px;
        }

        .info-value {
            font-size: 16px;
            font-weight: 500;
            color: #ffffff;
            line-height: 1.5;
        }

        .contact-section {
            border-left-color: rgba(76, 175, 80, 0.6);
            text-align: center;
        }

        .contact-section:hover {
            border-left-color: rgba(76, 175, 80, 0.8);
        }

        .contact-section .info-label {
            color: rgba(76, 175, 80, 0.9);
        }

        .phone-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: #4CAF50;
            text-decoration: none;
            font-weight: 600;
            font-size: 18px;
            padding: 8px 16px;
            border-radius: 8px;
            background: rgba(76, 175, 80, 0.1);
            border: 1px solid rgba(76, 175, 80, 0.3);
            transition: all 0.3s ease;
        }

        .phone-link:hover {
            background: rgba(76, 175, 80, 0.2);
            border-color: rgba(76, 175, 80, 0.5);
            transform: scale(1.02);
            box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
        }

        .phone-icon {
            font-size: 16px;
            animation: pulse 2s ease-in-out infinite;
        }

        .contact-note {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.6);
            margin-top: 8px;
            font-style: italic;
        }

        .philosophy-section {
            border-left-color: rgba(255, 193, 7, 0.6);
        }

        .philosophy-section:hover {
            border-left-color: rgba(255, 193, 7, 0.8);
        }

        .philosophy-section .info-label {
            color: rgba(255, 193, 7, 0.9);
        }

        .philosophy-text {
            position: relative;
            padding-left: 30px;
        }

        .philosophy-text::before {
            content: '"';
            position: absolute;
            left: 0;
            top: -5px;
            font-size: 24px;
            color: rgba(255, 193, 7, 0.7);
            font-weight: bold;
        }

        .philosophy-text::after {
            content: '"';
            font-size: 24px;
            color: rgba(255, 193, 7, 0.7);
            font-weight: bold;
        }

        .character-close-btn {
            position: absolute;
            top: 15px;
            right: 15px;
            width: 36px;
            height: 36px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 18px;
            color: rgba(255, 255, 255, 0.7);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-weight: 300;
            z-index: 10;
        }

        .character-close-btn:hover {
            background: rgba(255, 100, 100, 0.2);
            border-color: rgba(255, 100, 100, 0.4);
            color: #ffffff;
            transform: rotate(90deg) scale(1.1);
        }
        
        #company-name-display {
            position: fixed;
            bottom: 20px;
            left: 20px;
            background: linear-gradient(135deg, 
                rgba(40, 40, 40, 0.9) 0%, 
                rgba(20, 20, 20, 0.95) 100%);
            color: var(--text-light);
            padding: 12px 18px;
            border-radius: var(--border-radius-large);
            font-weight: bold;
            z-index: 1000;
            backdrop-filter: var(--blur-effect);
            border: 2px solid rgba(255, 215, 0, 0.3);
            font-size: 16px !important;
            font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
            letter-spacing: 1px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            user-select: none;
            animation: slideInFromRight 0.8s ease-out 0s forwards;
        }
        
        #company-name-display:hover {
            background: linear-gradient(135deg, 
                rgba(60, 60, 60, 0.95) 0%, 
                rgba(30, 30, 30, 1) 100%);
            transform: translateY(-3px) scale(1.02);
            border-color: rgba(255, 215, 0, 0.5);
        }
        
        #company-name-display:active {
            transform: translateY(0) scale(0.98);
        }

        .loading-indicator {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: rgba(255, 255, 255, 0.9);
            font-size: 18px;
            font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            z-index: 999;
            background: linear-gradient(135deg, 
                rgba(20, 30, 50, 0.95) 0%, 
                rgba(30, 45, 70, 0.95) 100%);
            backdrop-filter: blur(20px);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            padding: 30px 40px;
            box-shadow: 
                0 25px 50px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
            animation: slideInFromRight 0.8s ease-out 0s forwards;
            opacity: 1;
            will-change: opacity, transform;
        }

        .loading-indicator.show {
            opacity: 1;
        }

        .loading-indicator.hide {
            opacity: 0;
            transition: opacity 0.5s ease-out;
        }

        .loading-dots {
            display: flex;
            gap: 3px;
        }

        .loading-dots span {
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: #4CAF50;
            animation: loadingDots 1.5s ease-in-out infinite;
        }

        .loading-dots span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .loading-dots span:nth-child(3) {
            animation-delay: 0.4s;
        }
        
        .speed-control-btn {
            position: fixed !important;
            color: var(--text-light) !important;
            width: 50px !important;
            height: 50px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            cursor: pointer !important;
            z-index: 2000 !important;
            box-shadow: var(--box-shadow-medium) !important;
            transition: all var(--transition-speed) ease !important;
            font-weight: bold !important;
            user-select: none !important;
            border-radius: 50% !important;
            backdrop-filter: var(--blur-effect) !important;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
            letter-spacing: 0.5px !important;
            font-size: 13px !important;
            border: 3px solid transparent !important;
            visibility: visible !important;
            opacity: 1 !important;
            font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif !important;
        }
        
        #speed-up-btn {
            bottom: 155px;
            right: 20px;
            background: linear-gradient(135deg, #3185FC 0%, #1E60D4 100%) !important;
            border-color: rgba(49, 133, 252, 0.6) !important;
        }
        
        #speed-down-btn {
            bottom: 100px;
            right: 20px;
            background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
            border-color: rgba(244, 67, 54, 0.6);
        }
        
        .speed-control-btn:hover {
            transform: translateX(3px) scale(1.08);
            box-shadow: var(--box-shadow-strong);
        }
        
        .speed-control-btn:active {
            transform: translateX(0) scale(0.95);
            box-shadow: var(--box-shadow-soft);
        }
        
        #speed-up-btn:hover {            
            background: linear-gradient(135deg, #5AA0FF 0%, #2B74E0 100%) !important;
            border-color: rgba(49, 133, 252, 0.8) !important;
        }
        
        #speed-down-btn:hover {
            background: linear-gradient(135deg, #ef5350 0%, #f44336 100%) !important;
            border-color: rgba(244, 67, 54, 0.8);
        }
        
        .speed-btn-disabled {
            opacity: 0.5 !important;
            cursor: not-allowed !important;
            pointer-events: none !important;
        }
        
        .speed-btn-stop {
            background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%) !important;
            border-color: rgba(158, 158, 158, 0.6) !important;
        }
        
        .premium-dialog {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.95);
            background: linear-gradient(135deg, rgba(15, 25, 40, 0.95) 0%, rgba(25, 35, 55, 0.95) 100%);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            z-index: 1001;
            max-width: 420px;
            min-width: 360px;
            padding: 0;
            box-shadow: 
                0 25px 50px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
            font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .premium-dialog.dialog-show {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }

        .premium-dialog.dialog-hide {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.9);
        }

        .dialog-content {
            padding: 40px 35px 20px;
            text-align: center;
        }

        .dialog-title {
            font-size: 24px;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 12px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
            letter-spacing: 0.5px;
        }

        .dialog-description {
            font-size: 16px;
            color: rgba(255, 255, 255, 0.8);
            line-height: 1.5;
            margin-bottom: 25px;
        }

        .premium-close-btn {
            position: absolute;
            bottom: 15px;
            right: 15px;
            width: 36px;
            height: 36px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 18px;
            color: rgba(255, 255, 255, 0.7);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-weight: 300;
        }

        .premium-close-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            color: #ffffff;
            transform: rotate(90deg) scale(1.1);
            border-color: rgba(255, 255, 255, 0.4);
        }

        .premium-button-container {
            display: flex;
            gap: 15px;
            padding: 0 35px 50px;
            justify-content: center;
        }

        .premium-btn {
            padding: 14px 28px;
            border: none;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            letter-spacing: 0.3px;
            position: relative;
            overflow: hidden;
            min-width: 120px;
            backdrop-filter: blur(10px);
        }

        .premium-btn::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;
        }

        .premium-btn:hover::before {
            left: 100%;
        }

        .premium-btn-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #ffffff;
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 
                0 8px 20px rgba(102, 126, 234, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
        }

        .premium-btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 
                0 12px 25px rgba(102, 126, 234, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
        }

        .premium-btn-primary:active {
            transform: translateY(0);
        }

        .premium-btn-secondary {
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 
                0 4px 12px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }

        .premium-btn-secondary:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: translateY(-1px);
            color: #ffffff;
            border-color: rgba(255, 255, 255, 0.3);
        }

        .premium-btn-secondary:active {
            transform: translateY(0);
        }

        .social-media-dialog {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.9);
            background: linear-gradient(135deg, 
                rgba(15, 25, 40, 0.98) 0%, 
                rgba(25, 35, 55, 0.98) 100%);
            backdrop-filter: blur(30px);
            border: 2px solid rgba(102, 126, 234, 0.3);
            border-radius: 20px;
            padding: 0;
            max-width: 500px;
            min-width: 420px;
            box-shadow: 
                0 25px 50px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
            font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
            z-index: 1003;
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .social-media-dialog-show {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }

        .social-media-dialog-hide {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.85);
        }

        .social-media-content {
            padding: 35px 30px 45px;
            text-align: center;
        }

        .social-media-title {
            font-size: 24px;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 25px;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
            letter-spacing: 0.5px;
        }

        .social-links-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-bottom: 30px;
        }

        .social-link {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 15px 20px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            text-decoration: none;
            color: #ffffff;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

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

        .social-link:hover::before {
            left: 100%;
        }

        .social-link:hover {
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
        }
        /* ===== ▼▼▼ 請在這裡新增以下程式碼 ▼▼▼ ===== */
        .social-link-disabled {
            filter: grayscale(100%);
            opacity: 0.5;
            pointer-events: none; /* 這是關鍵，讓滑鼠無法觸發點擊事件 */
            cursor: not-allowed;  /* 讓滑鼠游標變成「禁止」圖示 */
        }
        /* ===== ▲▲▲ 新增程式碼結束 ▲▲▲ ===== */

        .social-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            color: #ffffff;
        }

        .social-text {
            font-size: 14px;
            font-weight: 600;
            flex: 1;
            text-align: left;
        }

        .facebook { background: linear-gradient(135deg, #1877F2 0%, #42a5f5 100%); }
        .instagram { background: linear-gradient(135deg, #E4405F 0%, #fd79a8 100%); }
        .youtube { background: linear-gradient(135deg, #FF0000 0%, #ff6b6b 100%); }
        .line { background: linear-gradient(135deg, #00C300 0%, #06C755 100%); }
        .shop { background: linear-gradient(135deg, #00C300 0%, #4caf50 100%); }
        .website { background: linear-gradient(135deg, #FFA500 0%, #ffb74d 100%); }

        .social-media-close-btn {
            position: absolute;
            top: 15px;
            right: 15px;
            width: 36px;
            height: 36px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 18px;
            color: rgba(255, 255, 255, 0.7);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-weight: 300;
            z-index: 10;
        }

        .social-media-close-btn:hover {
            background: rgba(255, 100, 100, 0.2);
            border-color: rgba(255, 100, 100, 0.4);
            color: #ffffff;
            transform: rotate(90deg) scale(1.1);
        }
        
        #error-display {
            position: fixed;
            top: 10px;
            left: 10px;
            background-color: rgba(255, 0, 0, 0.7);
            color: white;
            padding: 10px;
            border-radius: 5px;
            z-index: 9999;
            max-width: 80%;
            display: none;
            font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
        }

        .embedded-avatar-wrap {
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 12px 0 8px;
        }

        .embedded-avatar {
            width: 100px;
            height: 100px;
            border-radius: 999px;
            border: 3px solid rgba(255,255,255,0.28);
            box-shadow: 0 6px 18px rgba(0,0,0,0.35);
            object-fit: cover;
            background: #111;
            display: block;
            margin: 0 auto;
        }

        .fade-removable { 
            transition: opacity 300ms ease; 
            will-change: opacity; 
        }
        
        .fade-removable.is-closing { 
            opacity: 0 !important; 
        }
        
        @media (max-width: 768px){
            .character-info-dialog,
            .greeting-dialog,
            .premium-dialog,
            .social-media-dialog,
            .npc-greeting-dialog,
            .ai-news-dialog {
                max-width: 92vw !important;
                min-width: auto !important;
                width: 92vw !important;
                max-height: 82vh !important;
                overflow: auto !important;
            }
            .character-content,
            .npc-greeting-content,
            .ai-news-content { 
                padding: 22px 18px 24px !important; 
            }
            .npc-invite-btn {
                min-width: 160px;
                padding: 10px 20px;
                font-size: 13px;
            }
        }

        .character-info-dialog,
        .greeting-dialog,
        .premium-dialog,
        .social-media-dialog,
        .npc-greeting-dialog,
        .ai-news-dialog {
            max-width: min(520px, 92vw) !important;
            min-width: min(360px, 92vw) !important;
            max-height: 86vh !important;
            overflow: auto !important;
            will-change: opacity, transform;
        }

        .character-info-dialog .character-avatar { 
            display: none !important; 
        }
        
        .character-info-dialog .character-icon-container { 
            margin-top: 0 !important; 
        }

        body::before,
        body::after {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 1;
        }

        body::before {
            background: radial-gradient(120% 90% at 50% 60%,
                rgba(0,0,0,0) 0%,
                rgba(0,0,0,0) 55%,
                rgba(0,0,0,0.25) 85%,
                rgba(0,0,0,0.45) 100%);
            mix-blend-mode: multiply;
        }

        body::after {
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncA type='table' tableValues='0 0.05'/></feComponentTransfer></filter><rect width='100%%' height='100%%' filter='url(%23n)'/></svg>");
            background-size: 220px 220px;
            opacity: .22;
        }

        @media (prefers-reduced-motion: reduce) {
            * { animation: none !important; transition: none !important; }
        }
