:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg: #020617;
    --card-bg: rgba(15, 23, 42, 0.94);
    --text-main: #ffffff;
    --border: #1e293b;
}

/* TŁO I GŁÓWNY KONTENER */

body {
    font-family: -apple-system, system-ui, sans-serif;
    background: #020617 url("img/bg-generujhaslo.jpg") no-repeat center center fixed;
    background-size: cover;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    padding: 20px;
    margin: 0;
}

.container {
    background: var(--card-bg);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    width: 100%;
    max-width: 550px;
}

h1 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 25px;
}

/* USTAWIENIA / FORMULARZ */

.settings-container {
    margin-bottom: 10px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    padding-right: 10px;
    color: var(--text-main);
}

.field-container {
    width: 200px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* JEDNO MIEJSCE NA STYL POLA – BEZ DUBLI */

.field-container input[type="number"],
.field-container input[type="text"],
.field-container select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #020617;
    font-size: 13px;
}

.field-container input[type="number"]::placeholder {
    color: rgba(15, 23, 42, 0.6);
}

.field-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* delikatny hover/focus */

.field-container input[type="number"]:focus,
.field-container input[type="text"]:focus,
.field-container select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px #4f46e5;
}

/* RADIO */

.radio-group {
    display: flex;
    gap: 10px;
    font-size: 14px;
}

.radio-group input[type="radio"] {
    margin-right: 4px;
}

/* POKAZYWANIE BLOKÓW */

#simpleSettings,
#randomSettings {
    display: none;
}

#simpleSettings.active,
#randomSettings.active {
    display: block;
}

/* PRZYCISKI */

.actions {
    display: flex;
    gap: 10px;
    margin: 20px 0 10px 0;
}

button {
    font-family: inherit;
}

.btn-generate {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    background: var(--primary);
    color: #ffffff;
    font-size: 14px;
}

.btn-generate:hover {
    background: var(--primary-hover);
}

/* LICZNIK GLOBALNY */

.global-counter {
    font-size: 12px;
    color: #cbd5f5;
    margin-bottom: 10px;
}

/* WYJŚCIE / LISTA HASEŁ */

.output {
    background: #020617;
    color: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.6;
    max-height: 260px;
    overflow-y: auto;
}

/* WIERSZ HASŁA + KOPIOWANIE */

.password-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #334155;
    padding: 4px 0;
}

.password-index {
    color: #94a3b8;
    min-width: 24px;
}

.password-text {
    flex: 1;
    word-break: break-all;
}

/* przycisk kopiowania – dyskretna ikonka */

.password-copy {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 4px;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23cbd5f5' viewBox='0 0 16 16'%3E%3Cpath d='M10 1.5A1.5 1.5 0 0 1 11.5 3v7A1.5 1.5 0 0 1 10 11.5H4A1.5 1.5 0 0 1 2.5 10V3A1.5 1.5 0 0 1 4 1.5z'/%3E%3Cpath d='M5 4h7A1.5 1.5 0 0 1 13.5 5.5v7A1.5 1.5 0 0 1 12 14H5a1.5 1.5 0 0 1-1.5-1.5v-7A1.5 1.5 0 0 1 5 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
    opacity: 0.35;
    cursor: pointer;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.password-row:hover .password-copy {
    opacity: 0.8;
}

.password-copy.copied {
    background-color: #4f46e5;
    opacity: 1;
}

/* META: ENTROPIA + CZAS ŁAMANIA */

.password-meta {
    font-size: 11px;
    color: #cbd5f5;
    margin-left: 32px;
    margin-bottom: 4px;
}

.password-meta strong {
    font-weight: 600;
}

/* FLAGI W SELECT (pole słownika) */

.flag-select {
    padding-left: 35px !important;
    background-repeat: no-repeat;
    background-position: 8px center;
    background-size: 20px auto;
}

/* Polska */
select#dictionary[data-lang="pl"] {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><rect width='512' height='256' fill='white'/><rect y='256' width='512' height='256' fill='red'/></svg>");
}

/* UK/EN */
select#dictionary[data-lang="en"] {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 300'><rect width='600' height='300' fill='%2300127b'/><path d='M0,0 L600,300 M600,0 L0,300' stroke='white' stroke-width='60'/><path d='M0,0 L600,300 M600,0 L0,300' stroke='%23c8102e' stroke-width='40'/><rect x='250' width='100' height='300' fill='white'/><rect y='100' width='600' height='100' fill='white'/><rect x='270' width='60' height='300' fill='%23c8102e'/><rect y='120' width='600' height='60' fill='%23c8102e'/></svg>");
}

/* Niemcy */
select#dictionary[data-lang="de"] {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 3'><rect width='5' height='1' fill='black'/><rect y='1' width='5' height='1' fill='%23dd0000'/><rect y='2' width='5' height='1' fill='%23ffce00'/></svg>");
}

/* RÓŻNE DROBIAZGI */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background-color: #334155;
    border-radius: 3px;
}

.password-note {
    margin-top: 8px;
    font-size: 11px;
    color: #9ca3af;
}