/* .gitignore Builder — styles.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg: #0a1a1a;
    --bg2: #0f2222;
    --bg3: #162d2d;
    --bg4: #1c3535;
    --border: #1e3a3a;
    --border2: rgba(255, 255, 255, 0.04);
    --text: #d8f5f2;
    --text2: #4a8a85;
    --text3: #2a5550;
    --primary: #00cec9;
    --primary2: #81ecec;
    --primary3: #007a76;
    --accent: #fdcb6e;
    --red: #ff7675;
    --purple: #a29bfe;
    --radius: 12px;
    --t: all 0.2s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.bg-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 50% 40% at 5% 5%, rgba(0, 206, 201, 0.07), transparent), radial-gradient(ellipse 40% 25% at 90% 90%, rgba(129, 236, 236, 0.04), transparent);
    z-index: 0;
}

/* Header */
header {
    background: rgba(10, 26, 26, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.hdr {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #00cec9, #007a76);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    color: #fff;
    box-shadow: 0 0 16px rgba(0, 206, 201, 0.25);
}

.brand-title {
    font-size: 14px;
    font-weight: 700;
}

h1.brand-title {
    display: inline;
}

.brand-sub {
    font-size: 10px;
    color: var(--text3);
}

/* Layout */
.layout {
    max-width: 1200px;
    margin: 14px auto;
    padding: 0 20px 48px;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 14px;
    position: relative;
    z-index: 1;
    align-items: start;
}

.left-col,
.right-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mt {
    margin-top: 12px;
}

/* Panels */
.panel {
    background: rgba(15, 34, 34, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
}

.panel:last-child {
    margin-bottom: 0;
}

.panel-title-row {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text2);
}

/* Search */
.search-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 34, 34, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 10px;
    margin-bottom: 8px;
    backdrop-filter: blur(10px);
}

.search-ic {
    flex-shrink: 0;
    font-size: 14px;
}

.search-inp {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.search-inp::placeholder {
    color: var(--text3);
}

/* Selected tags */
.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 28px;
    margin-bottom: 8px;
}

.sel-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(0, 206, 201, 0.15);
    border: 1px solid rgba(0, 206, 201, 0.3);
    font-size: 11px;
    font-weight: 600;
    color: var(--primary2);
}

.sel-tag-rm {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text3);
    font-size: 12px;
    padding: 0 1px;
    line-height: 1;
}

.sel-tag-rm:hover {
    color: var(--red);
}

/* Cat tabs */
.cat-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 8px;
    overflow-x: auto;
}

.cat-tab {
    padding: 5px 12px;
    border-radius: 7px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--t);
    color: var(--text2);
    white-space: nowrap;
}

.cat-tab.active {
    background: rgba(0, 206, 201, 0.12);
    border-color: rgba(0, 206, 201, 0.25);
    color: var(--primary2);
}

.cat-tab:hover {
    color: var(--primary2);
}

/* Preset grid */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
    margin-bottom: 0;
}

.preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--bg2);
    cursor: pointer;
    transition: var(--t);
    text-align: center;
}

.preset-btn:hover {
    border-color: var(--primary3);
    background: var(--bg3);
}

.preset-btn.selected {
    border-color: var(--primary);
    background: rgba(0, 206, 201, 0.1);
}

.preset-icon {
    font-size: 20px;
    line-height: 1;
}

.preset-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--text2);
    line-height: 1.2;
}

.preset-btn.selected .preset-name {
    color: var(--primary2);
}

/* Custom rules */
.custom-rules {
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 160px;
    overflow-y: auto;
}

.custom-rule-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.crule-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--primary2);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crule-rm {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text3);
    font-size: 12px;
}

.crule-rm:hover {
    color: var(--red);
}

.custom-inp {
    width: 100%;
    background: transparent;
    border: none;
    border-top: 1px solid var(--border2);
    color: var(--text);
    padding: 10px 12px;
    font-size: 11.5px;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.7;
    resize: vertical;
    min-height: 100px;
    outline: none;
}

.custom-inp::placeholder {
    color: var(--text3);
}

/* Output */
.line-count-bar {
    padding: 5px 12px;
    background: rgba(0, 206, 201, 0.04);
    border-bottom: 1px solid var(--border2);
    display: flex;
    gap: 10px;
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text3);
}

.output-pre {
    padding: 14px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    line-height: 1.75;
    color: var(--text);
    max-height: 60vh;
    overflow-y: auto;
    white-space: pre;
    overflow-x: auto;
}

.gi-section {
    color: #81ecec;
    font-weight: 700;
}

.gi-comment {
    color: var(--text3);
}

.gi-pattern {
    color: var(--text);
}

/* Pattern reference */
.pattern-list {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pattern-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
    font-size: 12px;
}

.pat-sym {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-weight: 600;
}

.pat-desc {
    color: var(--text2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--t);
}

.btn:hover {
    border-color: var(--primary);
    color: var(--primary2);
}

.btn-sm {
    padding: 3px 9px;
    font-size: 10px;
    border-radius: 6px;
}

.btn-download {
    background: rgba(0, 206, 201, 0.12);
    border-color: rgba(0, 206, 201, 0.3);
    color: var(--primary2);
}

/* Toast */
.toast-wrap {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}

.toast {
    background: var(--bg2);
    border: 1px solid rgba(0, 206, 201, 0.3);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 12px;
    color: var(--text);
    transform: translateX(20px);
    opacity: 0;
    transition: all 0.22s ease;
}

.toast.show {
    transform: none;
    opacity: 1;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px
}

@media(max-width:860px) {
    .layout {
        grid-template-columns: 1fr;
    }
}