        :root {
            --primary-color: #0f766e;
            --bg-dark: #080b12;
            --bg-panel: #eef2f5;
            --text-light: #ffffff;
            --text-dark: #1e293b;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        body,
        html {
            width: 100%;
            height: 100%;
            overflow: hidden;
            background-color: var(--bg-dark);
        }

        .app-container {
            display: flex;
            width: 100vw;
            height: 100vh;
            height: 100dvh;
            position: relative;
        }

        button,
        input,
        select {
            font: inherit;
        }

        button:focus-visible,
        input:focus-visible,
        select:focus-visible,
        a:focus-visible {
            outline: 3px solid rgba(13, 148, 136, 0.35);
            outline-offset: 3px;
        }

        /* 左侧动画区 */
        .hero-section {
            flex: 1;
            height: 100%;
            position: relative;
            background: linear-gradient(135deg, #090e1a 0%, #05070d 100%);
            display: flex;
            align-items: center;
            justify-content: flex-start;
            padding-left: 8%;
            overflow: hidden;
            z-index: 10;
        }

        #waveCanvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            pointer-events: none;
            display: block;
        }

        .hero-overlay {
            position: relative;
            z-index: 20;
            max-width: 540px;
            color: var(--text-light);
            pointer-events: none;
        }

        .hero-overlay button,
        .hero-overlay a {
            pointer-events: auto;
        }

        .welcome-tag {
            font-size: 0.85rem;
            letter-spacing: 4px;
            color: #70ebb3;
            font-weight: 700;
            text-transform: uppercase;
            margin-bottom: 12px;
            display: inline-block;
        }

        .hero-title {
            font-size: 2.8rem;
            font-weight: 400;
            letter-spacing: 2px;
            line-height: 1.2;
            margin-bottom: 18px;
            background: linear-gradient(120deg, #ffffff 30%, #a5f3fc 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            font-family: 'Times New Roman', Times, serif, sans-serif;
        }

        .hero-subtitle {
            font-size: 1rem;
            color: #94a3b8;
            line-height: 1.6;
            margin-bottom: 32px;
            font-weight: 300;
        }

        .toggle-drawer-btn {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 12px 24px;
            border-radius: 30px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: var(--text-light);
            font-size: 0.9rem;
            font-weight: 600;
            letter-spacing: 1px;
            cursor: pointer;
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
        }

        .toggle-drawer-btn:hover {
            background: rgba(255, 255, 255, 0.18);
            border-color: #70ebb3;
            color: #70ebb3;
            transform: translateX(4px);
        }

        /* 连接状态指示灯 */
        .conn-status {
            position: absolute;
            top: 18px;
            left: 18px;
            z-index: 30;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.75rem;
            color: #94a3b8;
            background: rgba(0, 0, 0, 0.3);
            padding: 6px 12px;
            border-radius: 20px;
            backdrop-filter: blur(6px);
        }

        .conn-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #f59e0b;
            box-shadow: 0 0 8px currentColor;
        }

        .conn-dot.ok {
            background: #34d399;
            color: #34d399;
        }

        .conn-dot.err {
            background: #ef4444;
            color: #ef4444;
        }

        /* 右侧抽屉 */
        .drawer-wrapper {
            position: absolute;
            top: 0;
            right: 0;
            height: 100%;
            width: 66.66vw;
            min-width: 360px;
            max-width: 600px;
            z-index: 100;
            display: flex;
            transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
            transform: translateX(0);
        }

        .drawer-wrapper.collapsed {
            transform: translateX(calc(100% - 36px));
        }

        .drawer-handle {
            width: 36px;
            height: 80px;
            padding: 0;
            border: 0;
            background: #eef2f5;
            align-self: center;
            border-radius: 16px 0 0 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: -6px 0 16px rgba(0, 0, 0, 0.15);
            color: #1e293b;
            font-size: 1.1rem;
            transition: background 0.2s, color 0.2s;
            z-index: 101;
            flex-shrink: 0;
        }

        .drawer-handle:hover {
            background: #ffffff;
            color: var(--primary-color);
        }

        .drawer-content {
            flex: 1;
            height: 100%;
            background: var(--bg-panel);
            padding: 24px 20px;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
            overflow-y: auto;
        }

        /* 卡片与表单 */
        .card-box {
            background: #ffffff;
            border-radius: 20px;
            padding: 32px 28px;
            margin: auto 0;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
            animation: fadeIn 0.5s ease-out;
        }

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

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

        .auth-tabs {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 6px;
            padding: 5px;
            margin-bottom: 24px;
            border-radius: 12px;
            background: #f1f5f9;
        }

        .auth-tab {
            min-height: 42px;
            border: 0;
            border-radius: 9px;
            background: transparent;
            color: #475569;
            font-weight: 700;
            cursor: pointer;
            transition: background 0.2s, color 0.2s, box-shadow 0.2s;
        }

        .auth-tab.active {
            color: #0f766e;
            background: #ffffff;
            box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
        }

        .auth-tab:disabled {
            cursor: wait;
            opacity: 0.65;
        }

        .auth-form {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        [hidden] {
            display: none !important;
        }

        .field-block {
            display: flex;
            flex-direction: column;
            gap: 7px;
        }

        .field-label {
            color: #334155;
            font-size: 0.86rem;
            font-weight: 650;
        }

        .input-group {
            position: relative;
            display: flex;
            align-items: center;
        }

        .input-icon {
            position: absolute;
            left: 14px;
            color: #94a3b8;
            font-size: 1rem;
            z-index: 2;
            pointer-events: none;
        }

        .input-control {
            width: 100%;
            padding: 13px 14px 13px 42px;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            font-size: 0.95rem;
            outline: none;
            background-color: #f8fafc;
            color: var(--text-dark);
            transition: border-color 0.2s, background-color 0.2s;
        }

        .input-control:focus {
            border-color: var(--primary-color);
            background-color: #ffffff;
            box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
        }

        .input-control[aria-invalid="true"] {
            border-color: #dc2626;
            background: #fff7f7;
        }

        .field-error {
            min-height: 1em;
            color: #b91c1c;
            font-size: 0.78rem;
            line-height: 1.35;
        }

        .password-hint {
            color: #64748b;
            font-size: 0.78rem;
            line-height: 1.4;
        }

        .form-options {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.85rem;
            color: #64748b;
            margin-top: -4px;
        }

        .remember-me {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
        }

        .forgot-link {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 500;
        }

        .auth-feedback,
        .tool-feedback {
            display: none;
            padding: 11px 13px;
            border: 1px solid transparent;
            border-radius: 10px;
            font-size: 0.84rem;
            line-height: 1.5;
        }

        .auth-feedback.visible,
        .tool-feedback.visible {
            display: block;
        }

        .auth-feedback.error,
        .tool-feedback.error {
            color: #991b1b;
            background: #fef2f2;
            border-color: #fecaca;
        }

        .auth-feedback.success,
        .tool-feedback.success {
            color: #166534;
            background: #f0fdf4;
            border-color: #bbf7d0;
        }

        .auth-feedback.info,
        .tool-feedback.info {
            color: #075985;
            background: #f0f9ff;
            border-color: #bae6fd;
        }

        .primary-btn {
            width: 100%;
            padding: 13px;
            border: none;
            border-radius: 25px;
            background: var(--primary-color);
            color: #ffffff;
            font-size: 0.95rem;
            font-weight: 700;
            letter-spacing: 1px;
            cursor: pointer;
            transition: background-color 0.2s, transform 0.1s;
            margin-top: 8px;
            box-shadow: 0 6px 18px rgba(13, 148, 136, 0.25);
        }

        .primary-btn:hover {
            background: #0f766e;
        }

        .primary-btn:active {
            transform: scale(0.98);
        }

        .primary-btn:disabled {
            background: #94a3b8;
            cursor: not-allowed;
            transform: none;
        }

        .user-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 16px;
            margin-bottom: 20px;
            border-bottom: 1px solid #f1f5f9;
        }

        .user-name {
            font-weight: 600;
            color: #0f172a;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .logout-btn {
            background: transparent;
            border: none;
            color: #ef4444;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .sub-title {
            font-size: 1.3rem;
            color: #0f172a;
            margin-bottom: 20px;
            text-align: center;
            font-weight: 700;
        }

        .step-block {
            margin-bottom: 18px;
        }

        .step-label {
            display: block;
            font-size: 0.88rem;
            font-weight: 600;
            color: #475569;
            margin-bottom: 8px;
        }

        select.input-control {
            padding-left: 14px;
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 1rem center;
            background-size: 1em;
        }

        .action-btn,
        .copy-btn {
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 10px;
            color: white;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .action-btn {
            background: #0284c7;
        }

        .action-btn:hover {
            background: #0369a1;
        }

        .copy-btn {
            background: #10b981;
            margin-top: 10px;
        }

        .copy-btn:hover {
            background: #059669;
        }

        .tips-text {
            font-size: 0.8rem;
            color: #94a3b8;
            margin-top: 8px;
            line-height: 1.4;
        }

        @media (max-width: 900px) {
            .drawer-wrapper {
                width: 100vw;
                min-width: 100vw;
            }

            .drawer-content {
                padding: max(16px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
                    max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
            }

            .card-box {
                padding: 26px 20px;
            }

            .input-control {
                font-size: 16px;
            }

            .form-options {
                flex-wrap: wrap;
                gap: 12px;
            }

            .hero-title {
                font-size: 2rem;
            }

            .hero-section {
                padding-left: 5%;
            }
        }

        @media (max-width: 380px) {
            .card-box {
                padding: 22px 16px;
            }

            .sub-title {
                font-size: 1.15rem;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                scroll-behavior: auto !important;
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }

            #waveCanvas {
                display: none;
            }
        }
