/* 🌙 Główny motyw (ciemny) */
body {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
}

/* 📝 Pola tekstowe (oryginalne textarea) */
textarea.form-control {
    font-family: "JetBrains Mono", "Fira Code", monospace;
    font-size: 0.85rem;
    background-color: #161b22 !important;
    border: 1px solid #30363d !important;
    color: #e6edf3 !important;
    resize: vertical;
    line-height: 1.4;
    padding: 10px 12px;
}

textarea.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(56, 139, 253, 0.25);
    border-color: #58a6ff !important;
}

/* 🔘 Przyciski */
.btn {
    border-radius: 8px !important;
    font-size: 0.9rem;
}

/* 🧭 Pasek nawigacji */
.navbar-brand {
    font-size: 1rem;
}

/* 📱 Drobne poprawki responsywne */
@media (max-width: 768px) {
    textarea.form-control {
        font-size: 0.8rem;
    }
}

::placeholder {
    color: #ccc !important;
}

@media (min-width: 1200px) {
    pre.form-control {
        min-height: 700px;
    }
}

/* 💡 Kolorowanie składni (Prism.js) */
pre[class*="language-"],
code[class*="language-"] {
    background: transparent !important;
    color: inherit !important;
    text-shadow: none !important;
    font-family: "JetBrains Mono", "Fira Code", monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    tab-size: 2;
}

/* 🎨 Kolory tokenów Prism.js */
.token.string       { color: #98fb98; }   /* jasnozielony */
.token.number       { color: #f0ad4e; }   /* pomarańczowy */
.token.boolean      { color: #5bc0de; }   /* niebieski */
.token.tag          { color: #f08080; }   /* różowy */
.token.attr-name    { color: #f8c471; }
.token.attr-value   { color: #98fb98; }
.token.punctuation  { color: #aaa; }

/* 🧹 Usuń marginesy i padding z Prism.js (usuwa lewy "indent") */
pre[class*="language-"] {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

/* 🧩 Pola wejściowe i wyjściowe (JSON/XML) */
#input,
#output {
    font-family: "JetBrains Mono", "Fira Code", monospace;
    font-size: 0.85rem;
    background-color: #161b22 !important;
    border: 1px solid #30363d !important;
    color: #e6edf3 !important;
    line-height: 1.4;
    border-radius: 0.375rem;
    padding: 0 !important; /* usuwa wewnętrzny padding z kontenera */
    margin: 0;
    resize: vertical;
    overflow: auto;
    white-space: pre; /* zachowuje dokładne formatowanie JSON/XML */
}

/* ✨ Wnętrze kodu */
#input code,
#output code {
    display: block;
    padding: 10px 12px !important; /* taki sam padding jak textarea */
    margin: 0 !important;
    white-space: pre;
}

/* 🧭 Fokus */
#input:focus,
#output:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(56, 139, 253, 0.25);
    border-color: #58a6ff !important;
}

/* 💡 Kursor w edytowalnym polu */
#input[contenteditable="true"] {
    caret-color: #e6edf3;
}

/* 🖥️ Dopasowanie wysokości dla dużych ekranów */
@media (min-width: 1200px) {
    #input,
    #output {
        min-height: 700px;
    }
}
