﻿
    .stg-wrapper {
        --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
        --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
        display: flex;
        justify-content: center;
        padding: clamp(0px, 5vw, 0px) 20px;
    }

    .stg-panel {
        position: relative;                
        width: 100%;
        max-width: 1300px;
        border-radius: 28px;
        padding: clamp(28px, 5vw, 56px);
        overflow: hidden;
    }
    
    #bgCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.5; z-index: 0; }
    .stg-content { position: relative; z-index: 1; }

    /* ---------- HERO ---------- */
    .stg-hero { text-align: center; max-width: 760px; margin: 0 auto 32px; }
    .stg-hero-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.3px; color: var(--primary-color); background: var(--primary-light); padding: 7px 16px; border-radius: 100px; margin-bottom: 22px; }
    .stg-hero-title { font-size: clamp(30px, 4.4vw, 44px); font-weight: 900; line-height: 1.15; letter-spacing: -0.025em; color: var(--text-main); margin-bottom: 16px; }
    .stg-hero-title em { font-style: normal; background: linear-gradient(120deg, var(--primary-color), var(--primary-gradient-end)); -webkit-background-clip: text; background-clip: text; color: transparent; }
    .stg-hero-desc { font-size: 16.5px; color: var(--text-muted); line-height: 1.7; margin-bottom: 24px; }

    /* ---------- STATS STRIP ---------- */
    .stg-stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
    .sc { background: var(--bg-body); border-radius: 16px; padding: 20px; border: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; text-align: center; }
    .sc.c-red .sc-lbl i { color: var(--primary-color); }
    .sc.c-indigo .sc-lbl i { color: #6366f1; }
    .sc.c-purple .sc-lbl i { color: #a855f7; }
    .sc.c-green .sc-lbl i { color: var(--success, #10b981); }
    .sc-val { font-size: 28px; font-weight: 900; color: var(--text-main); line-height: 1; margin-top: 12px; transition: transform 0.3s; font-family: 'Space Mono', monospace; }
    .sc-lbl { font-size: 13px; font-weight: 700; color: var(--text-muted); display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.5px; }

    /* ---------- WORKSPACE LAYOUT ---------- */
    .workspace-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; margin-bottom: 30px; }
    @media (max-width: 1000px) { .workspace-grid { grid-template-columns: 1fr; } }
    
    .stg-ws-panel { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; height: 100%; box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
    .panel-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
    .panel-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--border-color); background: var(--card-bg); }
    .panel-title { font-size: 14px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; }

    /* Card Header Bar with Integrated Language Selector */
    .cc-card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border-color); background: var(--card-bg); flex-wrap: wrap; }
    .cc-header-title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 800; color: var(--text-main); text-transform: uppercase; letter-spacing: 0.5px; }
    
    .cc-lang-box { display: flex; align-items: center; gap: 8px; }
    .dir-toggle-btn { display: flex; align-items: center; gap: 6px; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px; padding: 6px 10px; font-size: 11.5px; font-weight: 800; color: var(--text-main); cursor: pointer; transition: 0.2s; }
    .dir-toggle-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }

    /* ---------- CUSTOM DROPDOWN ---------- */
    .custom-dropdown { position: relative; display: inline-block; user-select: none; }
    .cd-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--bg-body); border: 1px solid var(--border-color); padding: 7px 14px; border-radius: 10px; font-size: 12.5px; font-weight: 800; color: var(--text-main); cursor: pointer; transition: all 0.2s; min-width: 130px; }
    .cd-header:hover, .custom-dropdown.active .cd-header { border-color: var(--primary-color); }
    .cd-value { display: flex; align-items: center; gap: 8px; }
    .cd-body { position: absolute; top: calc(100% + 6px); right: 0; width: 220px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); padding: 8px; z-index: 100; opacity: 0; visibility: hidden; transition: all 0.2s; display: flex; flex-direction: column; gap: 6px; }
    .custom-dropdown.active .cd-body { opacity: 1; visibility: visible; }
    .cd-search input { width: 100%; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px; padding: 7px 10px; font-size: 12px; color: var(--text-main); outline: none; }
    .cd-list { max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
    .cd-list::-webkit-scrollbar { width: 4px; }
    .cd-list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
    .cd-group-lbl { padding: 6px 10px 4px; font-size: 10px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; background: var(--bg-body); border-radius: 4px; margin-top: 4px; }
    .cd-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--text-main); cursor: pointer; transition: background 0.2s; }
    .cd-item:hover { background: var(--bg-body); }
    .cd-item.active { background: var(--primary-light); color: var(--primary-color); }

    /* Extracted Details Bar */
    .extracted-details-bar { display: flex; align-items: center; justify-content: space-between; background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.25); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
    .edb-info { display: flex; align-items: center; gap: 10px; overflow: hidden; flex: 1; }
    .edb-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; color: var(--success, #10b981); background: rgba(16, 185, 129, 0.15); padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
    .edb-url { font-size: 12.5px; font-weight: 700; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'Space Mono', monospace; }
    .edb-btn { background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-muted); border-radius: 6px; padding: 4px 8px; font-size: 11.5px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 4px; transition: 0.2s; }
    .edb-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }

    /* URL Import Box */
    .url-import-box { display: flex; align-items: center; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; padding: 6px 6px 6px 14px; width: 100%; margin-top: 10px; }
    .url-input { flex: 1; border: none; background: transparent; outline: none; font-size: 14px; color: var(--text-main); font-family: 'Space Mono', monospace; }
    .url-btn { background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end)); color: white; border: none; border-radius: 10px; padding: 10px 18px; font-size: 13px; font-weight: 800; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 6px; }
    .url-btn:disabled { opacity: 0.5; cursor: not-allowed; }

    /* Tabs Header */
    .tabs-header-tool { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--border-color); background: var(--bg-body); overflow-x: auto; }
    .tab-btn-tool { background: transparent; border: none; padding: 8px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 700; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: 0.2s; white-space: nowrap; }
    .tab-btn-tool:hover { color: var(--text-main); }
    .tab-btn-tool.active { background: var(--card-bg); color: var(--primary-color); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

    /* Form Elements */
    .input-group { margin-bottom: 20px; }
    .ig-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
    .ig-label { font-size: 13.5px; font-weight: 700; color: var(--text-main); }
    .ig-counter { font-size: 12px; font-weight: 700; color: var(--text-muted); font-family: 'Space Mono', monospace; }
    
    .c-input { width: 100%; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 14px 16px; font-size: 14.5px; color: var(--text-main); outline: none; transition: 0.2s; font-family: inherit; }
    .c-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 4px var(--primary-light); }
    textarea.c-input { min-height: 100px; resize: vertical; line-height: 1.5; }
    
    /* Progress Bars */
    .prog-wrap { width: 100%; height: 6px; background: var(--border-color); border-radius: 10px; margin-top: 8px; overflow: hidden; }
    .prog-fill { height: 100%; background: #16a34a; border-radius: 10px; transition: width 0.3s ease, background 0.3s; }
    .prog-fill.warn { background: #f59e0b; }
    .prog-fill.danger { background: #ef4444; }

    /* Switches */
    .stg-sw-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; margin-bottom: 12px; cursor: pointer; user-select: none; transition: 0.2s; }
    .stg-sw-row:hover { border-color: var(--primary-color); }
    .sw-label { font-size: 14px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
    .sw-track { width: 44px; height: 24px; background: var(--border-color); border-radius: 20px; position: relative; transition: 0.3s; }
    .sw-thumb { width: 18px; height: 18px; background: #fff; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: 0.3s; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
    .sw-track.on { background: #22c55e; }
    .sw-track.on .sw-thumb { transform: translateX(20px); }

    /* Code Box */
    .code-box-wrapper { flex: 1; border-bottom: 1px solid var(--border-color); background: rgba(0,0,0,0.02); min-height: 280px; }
    .dark-mode .code-box-wrapper { background: rgba(255,255,255,0.01); }
    .code-box { padding: 24px; font-family: 'Space Mono', monospace; font-size: 13px; color: var(--text-main); line-height: 1.7; overflow-x: auto; white-space: pre; }
    
    /* Syntax Highlighting */
    .h-tag { color: #e06c75; }
    .h-attr { color: #d19a66; }
    .h-val { color: #98c379; }
    .h-comment { color: #7f848e; font-style: italic; }

    /* SERP Preview */
    .serp-preview { background: #fff; padding: 18px; border-radius: 14px; border: 1px solid #dfe1e5; font-family: arial, sans-serif; }
    .dark-mode .serp-preview { background: #202124; border-color: #3c4043; }
    .sp-url { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
    .sp-url-text { font-size: 12px; color: #5f6368; line-height: 1; margin-top: 2px; }
    .sp-title { display: block; font-size: 19px; color: #1a0dab; text-decoration: none; margin-bottom: 4px; line-height: 1.3; font-weight: 400; overflow-wrap: break-word; }
    .sp-title:hover { text-decoration: underline; }
    .dark-mode .sp-title { color: #8ab4f8; }
    .sp-desc { font-size: 14px; color: #4d5156; line-height: 1.58; overflow-wrap: break-word; }
    .dark-mode .sp-desc { color: #bdc1c6; }

    .act-btn { background: transparent; border: 1px solid var(--border-color); border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 700; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: 0.2s; }
    .act-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
    .act-btn.primary { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }

    /* ---------- HISTORY SECTION ---------- */
    .stg-history-section { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 20px; padding: 24px; margin-bottom: 30px; }
    .stg-history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
    .stg-history-title { font-size: 15px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; margin: 0; }
    .stg-history-list { display: flex; flex-direction: column; gap: 10px; }
    .stg-history-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; cursor: pointer; transition: 0.2s; gap: 12px; }
    .stg-history-item:hover { border-color: var(--primary-color); transform: translateY(-1px); }
    .stg-history-info { display: flex; align-items: center; gap: 10px; overflow: hidden; flex: 1; }
    .stg-history-badge { font-size: 12px; font-weight: 800; padding: 4px 8px; border-radius: 6px; font-family: 'Space Mono', monospace; background: var(--primary-light); color: var(--primary-color); white-space: nowrap; }
    .stg-history-url { font-size: 13.5px; font-weight: 700; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .stg-history-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
    .stg-history-time { font-size: 12px; color: var(--text-muted); }
    .stg-history-del { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 6px; transition: 0.2s; display: flex; align-items: center; }
    .stg-history-del:hover { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
    .stg-btn-ghost { background: transparent; border: 1px solid var(--border-color); border-radius: 10px; padding: 8px 16px; font-size: 13.5px; font-weight: 700; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s; }
    .stg-btn-ghost:hover { border-color: var(--primary-color); color: var(--primary-color); }

    /* ---------- BENTO BOX FEATURES ---------- */
    .console-features { margin-top: 40px; width: 100%; }
    .bento-features-cluster { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(130px, auto); gap: 20px; 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: 24px; padding: 28px; display: flex; flex-direction: column; align-items: flex-start; position: relative; overflow: hidden; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
    
    .bento-card::before {
        content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
        width: 150px; height: 150px; background-size: contain; background-repeat: no-repeat; background-position: center;
        opacity: 0.03; transition: all 0.5s ease; pointer-events: none; z-index: 0;
    }
    .bento-card:hover::before { opacity: 0.08; transform: translate(-50%, -50%) scale(1.1); }
    .dark-mode .bento-card::before { filter: invert(1); opacity: 0.05; }
    
    .feat-icon-speed::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2 3 14h9l-1 8 10-12h-9l1-8z"/></svg>'); }
    .feat-icon-eye::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>'); }
    .feat-icon-ruler::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.3 15.3-7.6-7.6a2 2 0 0 0-2.8 0L2.7 15.9a2 2 0 0 0 0 2.8l2.6 2.6a2 2 0 0 0 2.8 0l8.2-8.2"/></svg>'); }
    .feat-icon-brain::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"/><path d="M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"/></svg>'); }
    .feat-icon-share::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><line x1="8.59" x2="15.42" y1="13.51" y2="17.49"/><line x1="15.41" x2="8.59" y1="6.51" y2="10.49"/></svg>'); }
    .feat-icon-shield::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10"/><path d="m9 12 2 2 4-4"/></svg>'); }

    .bento-card::after { content: ''; position: absolute; inset: 0; border-radius: 24px; background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%); pointer-events: none; }
    .bento-card:hover { transform: translateY(-4px) scale(1.01); border-color: var(--primary-color); box-shadow: 0 12px 30px rgba(0,0,0,0.06); }
    .bento-card-content { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; gap: 12px; }
    
    .dashed-ring-wrapper { position: relative; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; width: 44px; height: 44px; }
    .dashed-ring-wrapper::after { content: ''; position: absolute; top: -5px; left: -5px; right: -5px; bottom: -5px; border: 1px dashed var(--border-color); border-radius: 16px; 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::after { opacity: 1; transform: scale(1.1) rotate(180deg); border-color: var(--primary-color); }
    .bc-icon-wrapper { width: 44px; height: 44px; border-radius: 12px; 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.4s 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.1) rotate(4deg); }
    .bc-title { font-size: 16px; font-weight: 800; color: var(--text-main); margin: 0; }
    .bc-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; margin: 0; font-weight: 500; }
    
    @media (max-width: 900px) {
        .bento-features-cluster { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 600px) {
        .bento-features-cluster { grid-template-columns: 1fr; }
    }

    /* Floating Scroll to Top */
    .stg-scroll-top-btn {
        position: fixed;
        bottom: 30px;
        right: 30px;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        color: var(--primary-color);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
        z-index: 999;
        transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .stg-scroll-top-btn:hover {
        transform: translateY(-4px);
        background: var(--primary-color);
        color: #fff;
        box-shadow: 0 10px 25px rgba(var(--primary-color-rgb), 0.35);
    }