﻿<style>
    /* ==========================================================================
       TEXT REWRITER STUDIO — GUINRANK V7 DESIGN SYSTEM
       ========================================================================== */

    .trw-wrapper {
        position: relative;
        width: 100%;
        min-height: 100vh;
        background-color: var(--bg-body);
        color: var(--text-main);
        overflow-x: hidden;
        padding: 30px 20px 80px;
    }

    .trw-panel {
        max-width: 1320px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* ---------- HERO SECTION ---------- */
    .trw-hero {
        position: relative;
        text-align: center;
        padding: 40px 20px 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-ambient-glow {
        position: absolute;
        top: -60px;
        left: 50%;
        transform: translateX(-50%);
        width: 480px;
        height: 220px;
        background: radial-gradient(circle, color-mix(in srgb, var(--primary-color) 25%, transparent) 0%, transparent 70%);
        filter: blur(50px);
        pointer-events: none;
        z-index: 0;
    }

    .trw-hero-badge {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 16px;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 100px;
        font-size: 11.5px;
        font-weight: 800;
        letter-spacing: 0.8px;
        color: var(--primary-color);
        box-shadow: 0 4px 14px rgba(0,0,0,0.03);
        margin-bottom: 18px;
    }

    .badge-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--primary-color);
        box-shadow: 0 0 8px var(--primary-color);
    }

    .trw-hero-title {
        position: relative;
        font-size: clamp(2rem, 3.8vw, 3rem);
        font-weight: 900;
        line-height: 1.15;
        letter-spacing: -0.03em;
        color: var(--text-main);
        margin: 0 0 14px;
    }

    .trw-hero-title em {
        font-style: normal;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-gradient-end) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .trw-hero-desc {
        position: relative;
        max-width: 640px;
        font-size: 15px;
        line-height: 1.6;
        color: var(--text-muted);
        margin: 0 0 22px;
    }

    .hero-features-belt {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        flex-wrap: wrap;
    }

    .hfb-item {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        font-weight: 700;
        color: var(--text-muted);
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        padding: 5px 12px;
        border-radius: 100px;
    }

    .hfb-icon { width: 13px; height: 13px; color: var(--primary-color); }

    /* ---------- WORKSPACE SPLIT-SCREEN ---------- */
    .trw-workspace {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-top: 10px;
    }

    .trw-card {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 20px;
        display: flex;
        flex-direction: column;
        box-shadow: 0 10px 30px rgba(0,0,0,0.03);
        overflow: hidden;
        position: relative;
        transition: border-color 0.25s, box-shadow 0.25s;
    }

    .trw-card:hover {
        border-color: color-mix(in srgb, var(--primary-color) 40%, var(--border-color));
        box-shadow: 0 14px 36px rgba(0,0,0,0.05);
    }

    /* Card Header */
    .cc-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 18px;
        border-bottom: 1px solid var(--border-color);
        background: rgba(255, 255, 255, 0.015);
        gap: 10px;
        flex-wrap: wrap;
    }

    .cc-header-title {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        font-weight: 800;
        letter-spacing: 0.3px;
        color: var(--text-main);
    }

    .title-gradient {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .cc-lang-box {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* ---------- INTERACTIVE MODE PILLS BAR ---------- */
    .trw-modes-bar {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        background: var(--bg-body);
        border-bottom: 1px solid var(--border-color);
        overflow-x: auto;
        white-space: nowrap;
    }

    .mode-pill-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        border-radius: 100px;
        border: 1px solid var(--border-color);
        background: var(--card-bg);
        color: var(--text-muted);
        font-size: 11.5px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        flex-shrink: 0;
    }

    .mode-pill-btn:hover {
        color: var(--text-main);
        border-color: var(--primary-color);
        transform: translateY(-1px);
    }

    .mode-pill-btn.active {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end));
        color: white;
        border-color: transparent;
        box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color) 40%, transparent);
        font-weight: 800;
    }

    .mode-pill-btn i, .mode-pill-btn svg { width: 13px; height: 13px; }

    /* Custom Dropdown (GeoService Languages) */
    .custom-dropdown { position: relative; }
    .cd-header {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 12px;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        font-size: 12px;
        font-weight: 700;
        color: var(--text-main);
        cursor: pointer;
        transition: all 0.2s;
    }
    .cd-header:hover { border-color: var(--primary-color); }
    .cd-value { display: flex; align-items: center; gap: 6px; }
    .cd-flag { font-size: 13px; }
    .custom-dropdown.active .cd-header { border-color: var(--primary-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent); }

    .cd-body {
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        width: 230px;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 14px;
        box-shadow: 0 12px 32px rgba(0,0,0,0.12);
        z-index: 100;
        animation: cdSlideDown 0.18s ease;
        overflow: hidden;
    }

    @keyframes cdSlideDown {
        from { opacity: 0; transform: translateY(-6px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .cd-search { padding: 10px 12px; border-bottom: 1px solid var(--border-color); background: var(--bg-body); }
    .cd-search input { width: 100%; border: 1px solid var(--border-color); background: var(--card-bg); color: var(--text-main); font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 8px; outline: none; }
    .cd-search input:focus { border-color: var(--primary-color); }
    .cd-list { max-height: 240px; overflow-y: auto; padding: 6px; }
    .cd-group-lbl { font-size: 9.5px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); padding: 6px 10px; letter-spacing: 0.5px; }
    .cd-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-main); cursor: pointer; transition: all 0.15s; }
    .cd-item:hover { background: var(--bg-body); }
    .cd-item.active { background: var(--primary-light); color: var(--primary-color); font-weight: 700; }
    .cd-check { width: 14px; height: 14px; color: var(--primary-color); margin-left: auto; }
    .cd-no-results { padding: 14px; text-align: center; font-size: 12.5px; color: var(--text-muted); }

    /* Direction Toggle Button */
    .dir-toggle-btn {
        display: inline-flex; align-items: center; gap: 5px; background: var(--card-bg);
        border: 1px solid var(--border-color); border-radius: 10px; padding: 6px 10px;
        font-size: 11.5px; font-weight: 800; color: var(--text-muted); cursor: pointer; transition: all 0.2s;
    }
    .dir-toggle-btn:hover { color: var(--primary-color); border-color: var(--primary-color); }

    /* Card Toolbar */
    .trw-card-toolbar {
        display: flex; align-items: center; justify-content: space-between;
        padding: 8px 18px; border-bottom: 1px solid var(--border-color); background: var(--card-bg);
        gap: 10px; flex-wrap: wrap;
    }
    .trw-toolbar-modes, .trw-toolbar-actions, .trw-output-actions { display: flex; align-items: center; gap: 6px; }
    .trw-tool-btn {
        display: inline-flex; align-items: center; gap: 6px; background: var(--bg-body);
        border: 1px solid var(--border-color); border-radius: 8px; padding: 5px 10px;
        font-size: 11.5px; font-weight: 700; color: var(--text-muted); cursor: pointer; transition: all 0.18s ease;
    }
    .trw-tool-btn:hover { color: var(--text-main); border-color: var(--primary-color); background: var(--card-bg); }
    .trw-tool-btn.active { background: var(--primary-light); color: var(--primary-color); border-color: var(--primary-color); }
    .trw-tool-btn.danger:hover { color: #ef4444; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.06); }
    .badge-mini { font-size: 9px; font-weight: 800; background: var(--primary-color); color: white; padding: 1px 5px; border-radius: 100px; text-transform: uppercase; }

    /* View Mode Tabs (Clean vs Diff) */
    .view-mode-tabs {
        display: inline-flex;
        align-items: center;
        background: var(--bg-body);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 2px;
        gap: 2px;
    }
    .v-tab-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 4px 8px;
        border-radius: 6px;
        border: none;
        background: transparent;
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.15s;
    }
    .v-tab-btn:hover { color: var(--text-main); }
    .v-tab-btn.active { background: var(--card-bg); color: var(--primary-color); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }

    /* Variations Switcher */
    .variation-pills { display: flex; align-items: center; gap: 4px; }
    .var-btn {
        padding: 4px 8px;
        border-radius: 6px;
        border: 1px solid var(--border-color);
        background: var(--bg-body);
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.15s;
    }
    .var-btn:hover { border-color: var(--primary-color); color: var(--text-main); }
    .var-btn.active { background: var(--primary-light); color: var(--primary-color); border-color: var(--primary-color); }

    /* ---------- SLEEK COMPACT KEYWORDS DRAWER ---------- */
    .kw-drawer {
        display: grid;
        grid-template-columns: 1fr 1.4fr;
        gap: 10px;
        padding: 8px 16px;
        background: var(--bg-body);
        border-bottom: 1px solid var(--border-color);
        animation: cdSlideDown 0.18s ease;
    }
    .kw-input-wrap {
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        padding: 4px 10px;
        transition: border-color 0.2s, box-shadow 0.2s;
    }
    .kw-input-wrap:focus-within {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 15%, transparent);
    }
    .kw-icon { color: var(--text-muted); display: flex; align-items: center; }
    .kw-input-wrap input {
        flex: 1;
        min-width: 0;
        border: none;
        background: transparent;
        color: var(--text-main);
        font-size: 12px;
        font-weight: 600;
        outline: none;
        padding: 3px 0;
    }
    .kw-input-wrap input::placeholder { color: var(--text-muted); opacity: 0.6; font-size: 11.5px; }
    .kw-pill {
        font-family: monospace;
        font-size: 10px;
        font-weight: 700;
        color: var(--text-muted);
        background: var(--bg-body);
        padding: 2px 6px;
        border-radius: 4px;
        white-space: nowrap;
    }
    .kw-pill.over { color: #ef4444; background: rgba(239,68,68,0.1); }

    /* Textarea & Output Content */
    .trw-editor-area { flex: 1; display: flex; flex-direction: column; min-height: 280px; position: relative; }
    .trw-textarea {
        flex: 1; width: 100%; padding: 18px 20px; border: none; background: transparent;
        color: var(--text-main); font-size: 15px; line-height: 1.7; resize: none; outline: none;
    }
    .trw-textarea::placeholder { color: var(--text-muted); opacity: 0.45; }

    /* Explicit RTL & LTR Styles */
    .trw-textarea[dir="rtl"],
    .trw-textarea.rtl,
    .trw-output-content[dir="rtl"],
    .trw-output-content.rtl,
    .output-rendered-text.rtl,
    .output-diff-view.rtl,
    [dir="rtl"] .output-rendered-text,
    [dir="rtl"] .output-diff-view {
        direction: rtl !important;
        text-align: right !important;
        unicode-bidi: plaintext !important;
    }

    .trw-textarea[dir="ltr"],
    .trw-output-content[dir="ltr"] {
        direction: ltr;
        text-align: left;
    }

    /* Quick Preset Samples Box */
    .quick-samples-box {
        padding: 10px 18px 14px;
        border-top: 1px dashed var(--border-color);
        background: rgba(255, 255, 255, 0.01);
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .qs-header { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
    .qs-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .qs-chip {
        display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
        background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 100px;
        color: var(--text-main); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s;
    }
    .qs-chip:hover { border-color: var(--primary-color); background: var(--card-bg); transform: translateY(-1px); }
    .qs-chip-mode { font-size: 9.5px; font-weight: 800; background: var(--primary-light); color: var(--primary-color); padding: 2px 6px; border-radius: 100px; text-transform: uppercase; }

    /* Output Content */
    .trw-output-content {
        flex: 1; min-height: 280px; padding: 20px; overflow-y: auto; line-height: 1.75; font-size: 15px; color: var(--text-main);
        background: var(--bg-body);
    }
    .output-rendered-text { white-space: pre-wrap; word-wrap: break-word; }

    /* Visual Diff Highlights View */
    .output-diff-view { white-space: pre-wrap; word-wrap: break-word; line-height: 1.85; }
    .diff-add { background: rgba(34, 197, 94, 0.18); color: #15803d; padding: 2px 5px; border-radius: 4px; font-weight: 700; border-bottom: 2px solid #22c55e; }
    .dark-mode .diff-add { color: #4ade80; background: rgba(34, 197, 94, 0.22); }
    .diff-same { opacity: 0.9; }

    /* Empty State */
    .ue-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 260px; opacity: 0.7; text-align: center; padding: 20px; }
    .uee-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--bg-body); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; color: var(--primary-color); margin-bottom: 14px; }
    .uee-title { font-size: 15px; font-weight: 800; color: var(--text-main); margin-bottom: 6px; }
    .uee-desc { font-size: 13px; color: var(--text-muted); max-width: 300px; line-height: 1.5; }

    /* Card Footer & Action Button */
    .trw-card-footer {
        display: flex; align-items: center; justify-content: space-between;
        padding: 12px 18px; border-top: 1px solid var(--border-color); background: var(--bg-body);
        gap: 10px; flex-wrap: wrap;
    }
    .trw-meta-stats { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
    .meta-pill { display: inline-flex; align-items: center; gap: 4px; font-family: monospace; font-size: 11px; font-weight: 700; color: var(--text-muted); background: var(--card-bg); border: 1px solid var(--border-color); padding: 4px 8px; border-radius: 6px; }
    .meta-pill.over { color: #ef4444; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.06); }
    .readability-pill { background: color-mix(in srgb, var(--primary-color) 12%, transparent); color: var(--primary-color); border-color: color-mix(in srgb, var(--primary-color) 25%, transparent); }

    .trw-action-btn {
        position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end));
        border: none; border-radius: 100px; padding: 10px 22px; color: white;
        font-size: 13px; font-weight: 800; cursor: pointer; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        box-shadow: 0 6px 20px color-mix(in srgb, var(--primary-color) 35%, transparent);
    }
    .trw-action-btn:hover:not(:disabled) { transform: scale(1.03); box-shadow: 0 8px 26px color-mix(in srgb, var(--primary-color) 45%, transparent); }
    .trw-action-btn:active:not(:disabled) { transform: scale(0.97); }
    .trw-action-btn:disabled { background: var(--border-color); color: var(--text-muted); box-shadow: none; cursor: not-allowed; opacity: 0.6; }
    .btn-icon { width: 16px; height: 16px; }
    .btn-glow { position: absolute; inset: -2px; border-radius: 100px; background: inherit; filter: blur(8px); opacity: 0; transition: opacity 0.3s; z-index: -1; }
    .trw-action-btn:hover:not(:disabled) .btn-glow { opacity: 0.6; }

    .spin-anim { animation: trwSpin 1.8s linear infinite; }
    @keyframes trwSpin { to { transform: rotate(360deg); } }

    .stream-status-tag { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--primary-color); }
    .status-indicator-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-color); }
    .status-indicator-dot.pulse { animation: trwPulse 1.2s infinite ease-in-out; }
    .status-indicator-dot.done { background: var(--success, #10b981); }
    @keyframes trwPulse { 0%, 100% { transform: scale(0.9); opacity: 0.5; } 50% { transform: scale(1.4); opacity: 1; } }

    .streaming-cursor { display: inline-block; width: 2px; height: 16px; background-color: var(--primary-color); vertical-align: text-bottom; margin-left: 2px; animation: trwBlink 1s step-end infinite; }
    @keyframes trwBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

    .shortcut-hint { text-align: center; margin: 4px 0 28px 0; font-size: 12px; color: var(--text-muted); }
    .shortcut-hint kbd { background: var(--card-bg); border: 1px solid var(--border-color); padding: 2px 6px; border-radius: 5px; font-family: monospace; font-size: 11px; font-weight: 700; color: var(--text-main); }

    /* ---------- COMPARISON & ANALYTICS PANEL ---------- */
    .comparison-panel {
        background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px;
        padding: 24px 28px; margin-bottom: 36px; box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    }
    .cp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
    .cp-title { font-size: 15px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
    .cp-badge { font-size: 12px; font-weight: 800; padding: 6px 14px; border-radius: 100px; }
    .badge-high { background: color-mix(in srgb, var(--success, #10b981) 15%, transparent); color: var(--success, #10b981); border: 1px solid color-mix(in srgb, var(--success, #10b981) 30%, transparent); }
    .badge-med { background: color-mix(in srgb, var(--primary-color) 15%, transparent); color: var(--primary-color); border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent); }

    .cp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
    .cp-card { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
    .cpc-header { display: flex; justify-content: space-between; align-items: center; }
    .cpc-title { font-size: 13px; font-weight: 800; color: var(--text-main); }
    .cpc-tag { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
    .cpc-tag.increased { background: rgba(59,130,246,0.1); color: #3b82f6; }
    .cpc-tag.decreased { background: rgba(168,85,247,0.1); color: #a855f7; }
    .cpc-tag.equal { background: var(--card-bg); color: var(--text-muted); border: 1px solid var(--border-color); }
    .cpc-tag.success { background: rgba(34,197,94,0.1); color: #22c55e; }

    .cpc-body { display: flex; flex-direction: column; gap: 8px; }
    .cpc-stat-row { font-size: 12.5px; color: var(--text-muted); }
    .cpc-stat-row strong { color: var(--text-main); font-weight: 700; }
    .cpc-progress-bar { width: 100%; height: 6px; background: var(--card-bg); border-radius: 100px; overflow: hidden; border: 1px solid var(--border-color); }
    .cpc-progress-fill { height: 100%; background: var(--primary-color); border-radius: 100px; transition: width 0.4s ease; }
    .cpc-progress-fill.bg-gradient { background: linear-gradient(90deg, var(--primary-color), var(--primary-gradient-end)); }

    /* ---------- STATS STRIP ---------- */
    .stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
    .stats-sc { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; align-items: flex-start; box-shadow: 0 4px 16px rgba(0,0,0,0.02); }
    .stats-ico { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
    .stats-ico.cr { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
    .stats-ico.cb { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
    .stats-ico.cg { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
    .stats-ico.cp { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
    .stats-val { font-size: 26px; font-weight: 900; color: var(--text-main); line-height: 1; margin-bottom: 4px; transition: transform 0.3s; }
    .stats-val.popped { transform: scale(1.2); color: var(--primary-color); }
    .stats-lbl { font-size: 12.5px; font-weight: 700; color: var(--text-muted); }

    /* ---------- HISTORY SECTION ---------- */
    .trw-history-section { margin-top: 36px; margin-bottom: 40px; }
    .trw-history-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
    .trw-history-title { font-size: 14px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; margin: 0; }
    .trw-clear-btn { background: transparent; border: none; font-size: 12px; font-weight: 700; color: #ef4444; cursor: pointer; padding: 4px 10px; border-radius: 6px; transition: background 0.2s; }
    .trw-clear-btn:hover { background: rgba(239,68,68,0.1); }
    .trw-history-list { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; padding-right: 4px; }
    .trw-history-item { display: flex; align-items: center; justify-content: space-between; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 10px 14px; transition: all 0.2s; }
    .trw-history-item:hover { border-color: var(--primary-color); transform: translateX(3px); box-shadow: 0 4px 12px rgba(0,0,0,0.02); }
    .trw-history-info { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
    .trw-history-domain { font-size: 13.5px; font-weight: 700; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .trw-history-meta { display: flex; align-items: center; gap: 10px; }
    .trw-history-badge { background: var(--primary-light); color: var(--primary-color); padding: 3px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; }
    .trw-history-date { font-size: 11.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
    .trw-history-del-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 5px; border-radius: 6px; transition: all 0.2s; display: flex; align-items: center; }
    .trw-history-del-btn:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

    /* Limit Warning */
    .limit-warning { display: none; margin: 20px 0; padding: 14px 18px; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); border-radius: 16px; align-items: flex-start; gap: 10px; }
    .limit-warning.show { display: flex; }
    .lw-ico { color: #ef4444; flex-shrink: 0; }
    .lw-text { font-size: 13.5px; color: #ef4444; line-height: 1.5; font-weight: 500; }
    .lw-link { display: inline-flex; align-items: center; gap: 4px; color: #ef4444; text-decoration: underline; font-weight: 700; margin-top: 4px; }

    /* ---------- BENTO BOX FEATURES CLUSTER ---------- */
    .console-features { margin-top: 40px; width: 100%; }
    .bento-features-cluster { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; grid-auto-rows: minmax(130px, auto); gap: 18px; width: 100%; position: relative; z-index: 2; }
    .bento-card { background: rgba(255, 255, 255, 0.015); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border-color); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; align-items: flex-start; position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
    .bento-card:hover { transform: translateY(-3px); border-color: var(--primary-color); box-shadow: 0 10px 28px rgba(0,0,0,0.06); }
    .bento-card-content { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; gap: 10px; }
    
    .dashed-ring-wrapper { position: relative; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; width: 40px; height: 40px; }
    .dashed-ring-wrapper::before { content: ''; position: absolute; top: -4px; left: -4px; right: -4px; bottom: -4px; border: 1px dashed var(--border-color); border-radius: 14px; opacity: 0.5; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); z-index: 0; transform-origin: center center; }
    .bento-card:hover .dashed-ring-wrapper::before { opacity: 1; transform: scale(1.1) rotate(180deg); border-color: var(--primary-color); }
    
    .bc-icon-wrapper { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-body); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: all 0.3s ease; margin-bottom: 0; position: relative; z-index: 1; }
    .bento-card:hover .bc-icon-wrapper { background: linear-gradient(135deg, var(--primary-color), var(--border-color)); color: white; border-color: transparent; transform: scale(1.08) rotate(3deg); }
    .bc-icon-wrapper i, .bc-icon-wrapper svg { width: 16px; height: 16px; }

    .bc-title { font-size: 15px; font-weight: 800; color: var(--text-main); margin: 0; }
    .bc-desc { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin: 0; font-weight: 500; }
    
    .bc-wide-top { grid-column: span 2; }
    .bc-tall { grid-row: span 2; }
    .bc-wide-mid { grid-column: span 2; }
    .bc-wide-top .bento-card-content, .bc-wide-mid .bento-card-content { justify-content: center; }
    .bc-wide-top .bc-desc, .bc-wide-mid .bc-desc { max-width: 85%; }

    /* Responsive Breakdown */
    @media (max-width: 900px) {
        .trw-workspace { grid-template-columns: 1fr; }
        .trw-card { min-height: 420px; }
        .kw-drawer { grid-template-columns: 1fr; }
        .bento-features-cluster { grid-template-columns: repeat(2, 1fr); }
        .bc-wide-top, .bc-wide-mid { grid-column: span 2; }
        .bc-tall { grid-row: span 1; grid-column: span 1; }
    }
    @media (max-width: 600px) {
        .cc-card-header { flex-direction: column; align-items: stretch; gap: 10px; }
        .cc-lang-box { justify-content: space-between; width: 100%; }
        .trw-card-toolbar { flex-direction: column; align-items: stretch; }
        .trw-toolbar-modes, .trw-toolbar-actions { justify-content: space-between; }
        .kw-drawer { grid-template-columns: 1fr; }
        .bento-features-cluster { grid-template-columns: 1fr; }
        .bc-wide-top, .bc-wide-mid, .bc-tall { grid-column: span 1; }
        .bc-wide-top .bc-desc, .bc-wide-mid .bc-desc { max-width: 100%; }
    }
</style>