/* Přihlášení a registrace – společný světlý vzhled (dřív <style> v auth/register.php; auth/login.php měl vlastní tmavý).
   Načítá se v <head> obou stránek. */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ink: #0d1117;
    --ink2: #374151;
    --muted: #6b7280;
    --light: #9ca3af;
    --border: #e5e7eb;
    --bg: #ffffff;
    --bg2: #f9fafb;
    --bg3: #f3f4f6;
    --primary: #5b50f0;
    --secondary: #4a40d4;
    --accent-bg: #f0efff;
    --success: #16a34a;
    --danger: #dc2626;
    /* zpětné aliasy pro starší pravidla */
    --text-primary: #0d1117;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --shadow: 0 24px 70px rgba(15, 23, 42, .08);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.95), rgba(255,255,255,.82) 42%, transparent 60%),
        linear-gradient(135deg, #f3f2ff 0%, #ffffff 52%, #f8fafc 100%);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(91, 80, 240, 0.10) 0%, transparent 42%),
        radial-gradient(circle at 85% 88%, rgba(91, 80, 240, 0.08) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

.lang-selector {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    color: var(--ink2);
    padding: 0.5rem 1rem;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}

.lang-btn:hover {
    background: #fff;
    border-color: rgba(209,213,219,.95);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    min-width: 150px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
    display: none;
    padding: 6px;
}

.lang-dropdown.active {
    display: block;
}

.lang-option {
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    color: var(--ink2);
    font-size: 0.9rem;
    border-radius: 10px;
    font-weight: 600;
}

.lang-option:hover {
    background: var(--bg2);
}

.lang-option.active {
    background: var(--accent-bg);
    color: var(--primary);
}

.register-container,
.login-container {
    width: 100%;
    max-width: 520px;
    position: relative;
    z-index: 1;
}

.register-header,
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 10px 24px rgba(91, 80, 240, 0.24);
}

.register-title,
.login-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: -.04em;
    color: var(--ink);
}

.register-subtitle,
.login-subtitle {
    color: var(--muted);
    font-size: 1rem;
}

.card {
    background: linear-gradient(180deg, #ffffff 0%, #fcfcff 100%);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .06);
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: 1px solid;
}

.alert-success {
    background: #dcfce7;
    border-color: rgba(22, 163, 74, 0.25);
    color: #15803d;
}

.alert-error {
    background: #fef2f2;
    border-color: rgba(220, 38, 38, 0.25);
    color: #b91c1c;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--ink2);
    font-size: 0.9375rem;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 0.875rem 1.125rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--ink);
    font-size: 1rem;
    transition: all 0.15s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(91, 80, 240, 0.15);
}

input::placeholder {
    color: var(--light);
}

.password-strength {
    height: 4px;
    background: var(--bg3);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: var(--danger);
}

.password-strength-bar.medium {
    width: 66%;
    background: #d97706;
}

.password-strength-bar.strong {
    width: 100%;
    background: var(--success);
}

.plan-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.plan-option {
    position: relative;
}

.plan-option input {
    position: absolute;
    opacity: 0;
}

.plan-option label {
    display: block;
    padding: 1rem;
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    margin: 0;
}

.plan-option label:hover {
    border-color: rgba(91, 80, 240, .4);
}

.plan-option input:checked + label {
    background: var(--accent-bg);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 80, 240, 0.15);
}

.plan-name {
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--ink);
}

.plan-price {
    font-size: 0.875rem;
    color: var(--muted);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    font-weight: 400;
    font-size: 0.9375rem;
    cursor: pointer;
    color: var(--ink2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 0.875rem;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 24px rgba(91, 80, 240, 0.24);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(91, 80, 240, 0.32);
}

.btn-primary:active {
    transform: translateY(0);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--light);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.divider span {
    padding: 0 1rem;
}

.text-center {
    text-align: center;
}

.link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.link:hover {
    color: var(--secondary);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: all 0.15s ease;
}

.back-link:hover {
    color: var(--ink);
    transform: translateX(-4px);
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    .card {
        padding: 2rem 1.5rem;
    }

    .register-title,
    .login-title {
        font-size: 1.75rem;
    }

    .plan-selector {
        grid-template-columns: 1fr;
    }
}

/* Přihlášení je užší než registrace */
.login-container { max-width: 460px; }

/* Tlačítko zobrazit/skrýt heslo (dřív vložené v auth/login.php) */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 2.8rem; }
.pw-toggle { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--light); padding: 2px; display: flex; line-height: 0; }
.pw-toggle:hover { color: var(--ink2); }

.logo-img { max-height: 52px; max-width: 200px; width: auto; object-fit: contain; }
.logo-icon .bi { color: #fff; font-size: 1.5rem; }
.alert .bi { margin-right: .35rem; }
