
:root {
            --bg-main: #1a1a1a;
            --bg-card: #2a2a2a;
            --text-primary: #ffffff;
            --text-secondary: #a0a0a0;
            --border: rgba(255, 255, 255, 0.08);
            --accent: #bc389f;
            --ease: cubic-bezier(0.16, 1, 0.3, 1);
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            min-height: 100vh;
            background: var(--bg-main);
            display: flex;
            overflow-x: hidden;
            color: var(--text-primary);
            position: relative;
        }

        .blob {
            position: absolute;
            width: 900px;
            height: 900px;
            background: radial-gradient(circle at 30% 30%, #bc389f, #000000);
            filter: blur(120px);
            border-radius: 50%;
            animation: blobMove 18s ease-in-out infinite alternate;
            z-index: 1;
            left: -200px;
            top: -200px;
            opacity: 0.55;
        }

        @keyframes blobMove {
            0%   { transform: scale(1) translate(0, 0); border-radius: 50%; }
            25%  { transform: scale(1.15) translate(40px, -20px); border-radius: 43% 57% 54% 46%; }
            50%  { transform: scale(1.05) translate(-20px, 50px); border-radius: 48% 52% 58% 42%; }
            75%  { transform: scale(1.18) translate(60px, 30px); border-radius: 55% 45% 40% 60%; }
            100% { transform: scale(1) translate(0, 0); border-radius: 50%; }
        }

        .back-button {
            position: absolute;
            top: 30px;
            left: 30px;
            width: 48px;
            height: 48px;
            background: rgba(42, 42, 42, 0.9);
            border: 1px solid var(--border);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s var(--ease);
            z-index: 10;
            text-decoration: none;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
        }

        .back-button:hover {
            background: var(--bg-card);
            transform: translateX(-4px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
        }

        .back-button svg {
            width: 20px;
            height: 20px;
            stroke: var(--text-primary);
            stroke-width: 2.5;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .login-section {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 60px 24px;
            z-index: 2;
        }

        .login-card {
            width: 100%;
            max-width: 400px;
            animation: slideIn 1s var(--ease);
        }

        .header { margin-bottom: 28px; }
        .header h1 {
            font-size: 34px;
            font-weight: 700;
            letter-spacing: -1px;
            margin-bottom: 12px;
            color: var(--text-primary);
        }
        .header p {
            color: var(--text-secondary);
            font-size: 17px;
        }

        .auth-toggle { display: none; }

        .tabs {
            display: flex;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 5px;
            margin-bottom: 28px;
        }
        .tabs label {
            flex: 1;
            text-align: center;
            padding: 12px 16px;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.25s var(--ease);
            user-select: none;
        }

        .form-login, .form-signup { display: none; }

        #tab-login:checked ~ .tabs label[for="tab-login"],
        #tab-signup:checked ~ .tabs label[for="tab-signup"] {
            background: var(--text-primary);
            color: var(--bg-main);
        }
        #tab-login:checked ~ .form-login { display: block; }
        #tab-signup:checked ~ .form-signup { display: block; }
        #tab-login:checked ~ .header-dynamic .title-login,
        #tab-signup:checked ~ .header-dynamic .title-signup { display: block; }
        .header-dynamic .title-login,
        .header-dynamic .title-signup { display: none; }

        .form-group { margin-bottom: 20px; }
        label.field-label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 10px;
            color: var(--text-primary);
        }

        input[type="text"], input[type="email"], input[type="password"] {
            width: 100%;
            height: 54px;
            padding: 0 16px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 14px;
            font-size: 16px;
            transition: all 0.25s var(--ease);
            color: var(--text-primary);
        }

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

        input:focus {
            background: var(--bg-card);
            border-color: var(--accent);
            outline: none;
            box-shadow: 0 0 0 4px rgba(188, 56, 159, 0.1);
        }

        .btn-submit {
            width: 100%;
            height: 54px;
            background: var(--text-primary);
            color: var(--bg-main);
            border: none;
            border-radius: 14px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            margin-top: 10px;
            transition: all 0.3s var(--ease);
        }

        .btn-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
        }

        .divider {
            text-align: center;
            margin: 26px 0;
            color: var(--text-secondary);
            position: relative;
            font-size: 13px;
        }
        .divider span {
            background: var(--bg-main);
            padding: 0 15px;
            position: relative;
            z-index: 1;
        }
        .divider::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            height: 1px;
            background: var(--border);
        }

        .btn-google {
            width: 100%;
            height: 54px;
            background: var(--bg-card);
            color: var(--text-primary);
            border: 2px solid var(--border);
            border-radius: 14px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
        }

        .btn-google:hover {
            border-color: #4285F4;
            box-shadow: 0 4px 12px rgba(66, 133, 244, 0.15);
        }

        .footer-link {
            margin-top: 26px;
            text-align: center;
            font-size: 13px;
            color: var(--text-secondary);
        }
        .footer-link a {
            color: var(--accent);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s;
        }
        .footer-link a:hover {
            color: var(--text-primary);
        }

        .hint {
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: 8px;
        }

        .messages {
            list-style: none;
            margin-bottom: 20px;
        }
        .messages li {
            padding: 12px 14px;
            border-radius: 10px;
            font-size: 14px;
            margin-bottom: 8px;
        }
        .messages li.error {
            background: rgba(220, 53, 69, 0.12);
            border: 1px solid rgba(220, 53, 69, 0.35);
            color: #ff8a95;
        }
        .messages li.success {
            background: rgba(40, 167, 69, 0.12);
            border: 1px solid rgba(40, 167, 69, 0.35);
            color: #7fe69b;
        }

        @keyframes slideIn {
            from { opacity: 0; transform: translateX(30px); }
            to { opacity: 1; transform: translateX(0); }
        }

.pw-field { position: relative; }

.pw-field input[type="password"],
.pw-field input[type="text"] { padding-right: 54px; }

.pw-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.pw-toggle:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.06); }
.pw-toggle:focus-visible {
    outline: none;
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(188, 56, 159, 0.35);
}
.pw-toggle svg { width: 20px; height: 20px; display: block; }

.pw-toggle svg[hidden] { display: none; }
.pw-toggle[aria-pressed="true"] { color: var(--accent); }

.hint-right { text-align: right; }
.hint a { color: var(--text-secondary); text-decoration: underline; }
.hint a:hover { color: var(--accent); }

.auth-intro {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 26px;
}
.auth-intro strong { color: var(--text-primary); font-weight: 600; }

.auth-note {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.auth-note a { color: var(--text-primary); text-decoration: underline; }
.auth-note a:hover { color: var(--accent); }

.auth-status {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.auth-status.ok { border-color: rgba(34, 197, 94, 0.4); }
.auth-status.err { border-color: rgba(239, 68, 68, 0.45); }
.auth-status svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; }
.auth-status.ok svg { color: #22c55e; }
.auth-status.err svg { color: #ef4444; }
.auth-status strong { color: var(--text-primary); display: block; margin-bottom: 3px; }

.auth-errors {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
    font-size: 13.5px;
    line-height: 1.55;
}
.auth-errors li + li { margin-top: 6px; }

.auth-rules {
    list-style: none;
    margin: 10px 0 0 0;
    padding: 0;
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.auth-rules li::before { content: "· "; color: var(--accent); }
