/* ============================================================
   Regex Extractor — Deluxe Edition CSS
   Premium UI • Theme Support • Editor-Level Quality
============================================================ */

/* -------------------------------
   BASE VARIABLES / THEMES
--------------------------------*/
:root {
    --bg: #0d0d0d;
    --bg-panel: #161616;
    --bg-input: #121212;
    --bg-textarea: #181818;
    --bg-result: #111;

    --text: #e6e6e6;
    --text-soft: #bbbbbb;

    --accent: #f0ea00;
    --accent-soft: rgba(240,234,0,0.2);

    --border: #2a2a2a;
    --border-strong: #3b3b3b;

    --shadow-1: rgba(0,0,0,0.35);
    --shadow-2: rgba(0,0,0,0.6);

    --radius: 10px;
}

/* -------------------------------
   LIGHT THEME
--------------------------------*/
[data-theme="light"] {
    --bg: #f3f3f3;
    --bg-panel: #ffffff;
    --bg-input: #ffffff;
    --bg-textarea: #fafafa;
    --bg-result: #fff;

    --text: #222;
    --text-soft: #555;

    --accent: #d4c800;
    --accent-soft: rgba(212,200,0,0.2);

    --border: #cccccc;
    --border-strong: #999999;
}

/* -------------------------------
   MIDNIGHT THEME
--------------------------------*/
[data-theme="midnight"] {
    --bg: #05050a;
    --bg-panel: #0b0b14;
    --bg-input: #0f0f1c;
    --bg-textarea: #121225;
    --bg-result: #0d0d1a;

    --text: #dfe6ff;
    --text-soft: #9aa8d4;

    --accent: #6e73ff;
    --accent-soft: rgba(110,115,255,0.25);

    --border: #252545;
    --border-strong: #3a3a6b;
}

/* -------------------------------
   SOLARIZED THEME
--------------------------------*/
[data-theme="solarized"] {
    --bg: #002b36;
    --bg-panel: #073642;
    --bg-input: #083e49;
    --bg-textarea: #0c4f5f;
    --bg-result: #083e49;

    --text: #eee8d5;
    --text-soft: #b5c3bc;

    --accent: #b58900;
    --accent-soft: rgba(181,137,0,0.25);

    --border: #0c4f5f;
    --border-strong: #146679;
}

/* ============================================================
   BODY + GLOBAL
============================================================ */
body {
    background: var(--bg);
    color: var(--text);
    max-width: 1000px;
    margin: auto;
    padding: 40px 20px;
    font-family: "Inter", sans-serif;
}

/* ============================================================
   HEADERS
============================================================ */
h1 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 34px;
    text-shadow: 0 0 14px var(--accent-soft);
}

.subtitle {
    text-align: center;
    color: var(--text-soft);
    margin-bottom: 40px;
}

/* ============================================================
   FORMS
============================================================ */
.field-group {
    margin-bottom: 28px;
}

label {
    display: block;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
}

/* Inputs + Select */
input[type="text"],
select {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    outline: none;
    font-size: 15px;
    box-shadow: inset 0 0 8px var(--shadow-1);
}

input::placeholder {
    color: var(--text-soft);
}

/* ============================================================
   TOOLBAR BUTTONS
============================================================ */
.editor-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 8px 14px;
    font-size: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-panel);
    color: var(--text);
    cursor: pointer;
    transition: 0.25s ease;
    box-shadow: inset 0 0 6px var(--shadow-1);
}

.toolbar-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Theme dropdown */
.theme-select {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: var(--radius);
    background: var(--bg-panel);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: inset 0 0 6px var(--shadow-1);
}
.theme-select:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================
   TEXTAREA
============================================================ */
textarea {
    width: 100%;
    height: 280px;
    padding: 18px 20px;
    font-family: "JetBrains Mono", monospace;
    background: var(--bg-textarea);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    resize: vertical;
    font-size: 14px;
    line-height: 1.55;
    box-shadow: inset 0 2px 3px var(--shadow-1);
    transition: all 0.25s ease;
}
textarea:hover {
    border-color: var(--border-strong);
}
textarea:focus {
    border-color: var(--accent);
    background: var(--bg-panel);
    box-shadow:
        0 0 0 2px var(--accent-soft),
        0 0 16px var(--accent-soft),
        inset 0 2px 4px var(--shadow-1);
}

/* ============================================================
   RESULTS
============================================================ */
#results {
    margin-top: 30px;
}

details {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    box-shadow: inset 0 0 6px var(--shadow-1);
}

summary {
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
}

pre {
    margin-top: 14px;
    background: var(--bg-result);
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    white-space: pre-wrap;
    font-family: "JetBrains Mono", monospace;
}

/* ============================================================
   TOAST
============================================================ */
#toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    background: var(--accent);
    color: #000;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    opacity: 0;
    transform: translateY(8px);
    transition: 0.35s ease;
}
#toast.show {
    opacity: 1;
    transform: translateY(0);
}
