        * { margin: 0; padding: 0; box-sizing: border-box; }
        html { scroll-padding-top: 80px; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            background: #f5f7fa;
            color: #333;
            line-height: 1.6;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }
        
        header {
            background: #fff;
            border-bottom: 1px solid #e8ecf1;
            padding: 16px 0;
            position: sticky;
            top: 0;
            z-index: 100;
        }
        .header-inner {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .logo {
            font-size: 20px;
            font-weight: 700;
            color: #2563eb;
            text-decoration: none;
        }
        .nav a {
            color: #64748b;
            text-decoration: none;
            margin-left: 24px;
            font-size: 14px;
            transition: color 0.2s;
        }
        .nav a:hover { color: #2563eb; }
        
        .hero-section {
            padding: 40px 0 30px;
        }
        .hero-section h1 {
            font-size: 28px;
            color: #1e293b;
            text-align: center;
            margin-bottom: 8px;
        }
        .subtitle {
            text-align: center;
            color: #64748b;
            font-size: 16px;
            margin-bottom: 30px;
        }
        
        .tool-wrapper {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            margin-bottom: 40px;
        }
        
        .settings-panel {
            background: #fff;
            border-radius: 12px;
            padding: 28px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }
        .panel-title {
            font-size: 18px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .setting-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 0;
            border-bottom: 1px solid #f1f5f9;
        }
        .setting-row:last-child { border-bottom: none; }
        .setting-label {
            font-size: 15px;
            color: #475569;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .length-control {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .length-value {
            font-size: 18px;
            font-weight: 700;
            color: #2563eb;
            min-width: 32px;
            text-align: center;
        }
        input[type="range"] {
            width: 140px;
            height: 6px;
            -webkit-appearance: none;
            background: #e2e8f0;
            border-radius: 3px;
            outline: none;
        }
        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 20px;
            height: 20px;
            background: #2563eb;
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(37,99,235,0.3);
        }
        
        .toggle {
            position: relative;
            width: 44px;
            height: 24px;
        }
        .toggle input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0; left: 0; right: 0; bottom: 0;
            background: #cbd5e1;
            border-radius: 24px;
            transition: 0.3s;
        }
        .toggle-slider:before {
            content: "";
            position: absolute;
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background: #fff;
            border-radius: 50%;
            transition: 0.3s;
        }
        .toggle input:checked + .toggle-slider { background: #2563eb; }
        .toggle input:checked + .toggle-slider:before { transform: translateX(20px); }
        
        .result-panel {
            background: #fff;
            border-radius: 12px;
            padding: 28px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
            display: flex;
            flex-direction: column;
        }
        .password-display {
            background: #f8fafc;
            border: 2px dashed #cbd5e1;
            border-radius: 10px;
            padding: 24px;
            text-align: center;
            min-height: 80px;
            display: flex;
            align-items: center;
            justify-content: center;
            word-break: break-all;
            font-family: "Courier New", monospace;
            font-size: 22px;
            color: #1e293b;
            letter-spacing: 1px;
            margin-bottom: 20px;
            position: relative;
        }
        .password-display.empty {
            color: #94a3b8;
            font-size: 16px;
            font-family: inherit;
            letter-spacing: 0;
        }
        
        .strength-bar {
            display: flex;
            gap: 6px;
            margin-bottom: 8px;
            height: 6px;
        }
        .strength-segment {
            flex: 1;
            background: #e2e8f0;
            border-radius: 3px;
            transition: background 0.3s;
        }
        .strength-segment.active.weak { background: #ef4444; }
        .strength-segment.active.fair { background: #f59e0b; }
        .strength-segment.active.good { background: #3b82f6; }
        .strength-segment.active.strong { background: #22c55e; }
        
        .strength-text {
            text-align: right;
            font-size: 13px;
            color: #64748b;
            margin-bottom: 20px;
        }
        
        .btn-group {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            margin-top: auto;
        }
        .btn {
            padding: 14px 20px;
            border: none;
            border-radius: 8px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        .btn-primary {
            background: #2563eb;
            color: #fff;
        }
        .btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); }
        .btn-secondary {
            background: #f1f5f9;
            color: #475569;
            border: 1px solid #e2e8f0;
        }
        .btn-secondary:hover { background: #e2e8f0; }
        
        .history-section {
            background: #fff;
            border-radius: 12px;
            padding: 20px 28px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
            margin-bottom: 40px;
        }
        .history-title {
            font-size: 16px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 12px;
        }
        .history-list {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
        }
        .history-item {
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 8px 14px;
            font-family: monospace;
            font-size: 14px;
            color: #475569;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            overflow: hidden;
        }
        .history-item:hover {
            border-color: #2563eb;
            color: #2563eb;
        }
        .history-item span:first-child {
            word-break: break-all;      /* 长密码强制换行 */
            overflow-wrap: break-word;    /* 兼容备用 */
            min-width: 0;               /* 配合 flex 布局收缩 */
        }
        .history-item .copy-mini {
            font-size: 12px;
            color: #94a3b8;
        }
        .history-item:hover .copy-mini { color: #2563eb; }
        .history-empty {
            color: #94a3b8;
            font-size: 14px;
        }
        
        .content-section {
            background: #fff;
            border-radius: 12px;
            padding: 40px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
            margin-bottom: 24px;
        }
        .content-section h2 {
            font-size: 22px;
            color: #1e293b;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 2px solid #f1f5f9;
        }
        .content-section h3 {
            font-size: 18px;
            color: #334155;
            margin: 24px 0 12px;
        }
        .content-section p {
            color: #475569;
            margin-bottom: 12px;
            line-height: 1.8;
        }
        .content-section ul {
            margin-left: 20px;
            color: #475569;
            margin-bottom: 16px;
        }
        .content-section li {
            margin-bottom: 8px;
            line-height: 1.7;
        }
        .highlight-box {
            background: #eff6ff;
            border-left: 4px solid #2563eb;
            padding: 16px 20px;
            border-radius: 0 8px 8px 0;
            margin: 20px 0;
        }
        .highlight-box p { margin: 0; color: #1e40af; }
        
        .faq-item {
            border-bottom: 1px solid #f1f5f9;
            padding: 20px 0;
        }
        .faq-item:last-child { border-bottom: none; }
        .faq-question {
            font-size: 16px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 8px;
        }
        .faq-answer {
            color: #64748b;
            line-height: 1.8;
        }
        
        footer {
            background: #fff;
            border-top: 1px solid #e8ecf1;
            padding: 30px 0;
            margin-top: 40px;
            text-align: center;
        }
        .footer-links {
            margin-bottom: 12px;
        }
        .footer-links a {
            color: #64748b;
            text-decoration: none;
            margin: 0 12px;
            font-size: 14px;
        }
        .footer-links a:hover { color: #2563eb; }
        .copyright {
            color: #94a3b8;
            font-size: 13px;
        }
        
        .toast {
            position: fixed;
            top: 80px;
            left: 50%;
            transform: translateX(-50%) translateY(-20px);
            background: #1e293b;
            color: #fff;
            padding: 10px 24px;
            border-radius: 8px;
            font-size: 14px;
            opacity: 0;
            transition: all 0.3s;
            pointer-events: none;
            z-index: 1000;
        }
        .toast.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
        
        @media (max-width: 768px) {
            .tool-wrapper {
                grid-template-columns: 1fr;
            }
            .hero-section h1 { font-size: 22px; }
            .btn-group { grid-template-columns: 1fr; }
            .content-section { padding: 24px; }
            .password-display { font-size: 18px; }
            .history-list {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        .menu-toggle {
            display: none;
            background: none;
            border: none;
            font-size: 22px;
            color: #64748b;
            cursor: pointer;
        }

        @media (max-width: 768px) {
            .nav {
                display: none;
                position: absolute;
                top: 100%;
                right: 20px;
                background: #fff;
                border: 1px solid #e8ecf1;
                border-radius: 8px;
                box-shadow: 0 4px 12px rgba(0,0,0,0.1);
                flex-direction: column;
                padding: 8px 0;
                min-width: 120px;
            }
            .nav.active {
                display: flex;
            }
            .nav a {
                margin: 0;
                padding: 10px 20px;
                border-bottom: 1px solid #f1f5f9;
            }
            .nav a:last-child {
                border-bottom: none;
            }
            .menu-toggle {
                display: block;
            }
        }