*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; }
a { text-decoration: none; }
button { cursor: pointer; border: none; }

:root {
    --font:   'Inter', sans-serif;
    --text:   #1a1a1a;
    --muted:  #888;
    --border: #e5e5e5;
    --radius: 8px;
}

.cadastro-page {
    min-height: 100vh;
    background: #fce8e8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.top-logo {
    position: fixed;
    top: 28px;
    left: 40px;
    z-index: 20;
}
.top-logo img {
    height: 61px;
    width: auto;
    display: block;
}

.auth-inner {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 80px 0 60px;
}

.blob {
    position: absolute;
    width: 960px;
    height: 960px;
    background: #fff;
    border-radius: 50%;
    right: -260px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.illustration {
    position: relative;
    z-index: 5;
    pointer-events: none;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.illustration img {
    width: 600px;
    height: auto;
    display: block;
    max-width: 100%;
    mix-blend-mode: multiply;
}

.card-wrap {
    position: relative;
    z-index: 10;
    padding-right: 60px;
    padding-left: 0;
    flex-shrink: 0;
}

.continue-as {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 0 16px;
    width: 380px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-bottom: 0;
    transition: max-height .4s ease,
                opacity .35s ease,
                margin-bottom .35s ease,
                padding .35s ease;
}

.continue-as.visible {
    max-height: 80px;
    opacity: 1;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.continue-as img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.continue-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.continue-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.continue-info span:last-child {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.continue-btn {
    flex-shrink: 0;
    padding: 7px 16px;
    background: #e01f1f;
    color: #fff;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 700;
    transition: background .15s;
}
.continue-btn:hover { background: #c41a1a; }

.card-flipper {
    width: 380px;
    perspective: 1200px;
    filter: drop-shadow(0 8px 48px rgba(0, 0, 0, .10));
}

.card-flipper-inner {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(.4, 0, .2, 1),
                height 0.55s cubic-bezier(.4, 0, .2, 1);
}

.card-flipper.flipped .card-flipper-inner {
    transform: rotateY(180deg);
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 44px 40px;
    width: 380px;
    box-shadow: none;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: rotateY(180deg);
}

.card h1 {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.25;
    margin-bottom: 8px;
}

.card-sub {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 24px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    transition: background .15s, border-color .15s, opacity .15s;
    margin-bottom: 10px;
}

.btn-google {
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text);
}
.btn-google:hover { background: #f7f7f7; border-color: #ccc; }

.btn-discord {
    background: #5865f2;
    border: 1.5px solid #5865f2;
    color: #fff;
}
.btn-discord:hover { opacity: .88; }

.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    color: var(--muted);
    font-size: 13px;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

#form-cadastro,
#form-login {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#form-cadastro input,
#form-login input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text);
    background: #fff;
    outline: none;
    font-family: var(--font);
    transition: border-color .15s;
}
#form-cadastro input::placeholder,
#form-login input::placeholder { color: #c0c0c0; }

#form-cadastro input:focus,
#form-login input:focus { border-color: #e01f1f; }

#form-cadastro button,
#form-login button {
    width: 100%;
    padding: 13px;
    background: #e01f1f;
    color: #fff;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font);
    margin-top: 4px;
    transition: background .15s, opacity .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}
#form-cadastro button:hover:not(:disabled),
#form-login button:hover:not(:disabled) { background: #c41a1a; }

#form-cadastro button:disabled,
#form-login button:disabled { opacity: .7; cursor: not-allowed; }

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin .65s linear infinite;
    flex-shrink: 0;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

.form-error {
    font-size: 13px;
    color: #e01f1f;
    text-align: center;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .3s ease, opacity .3s ease, margin-top .3s ease;
    margin-top: 0;
}
.form-error.visible {
    max-height: 48px;
    opacity: 1;
    margin-top: 4px;
}

input.input-error {
    border-color: #e01f1f !important;
    animation: input-shake .35s ease;
}
@keyframes input-shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-5px); }
    75%       { transform: translateX(5px); }
}

.card-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: var(--muted);
}
.card-footer a { color: #e01f1f; font-weight: 600; }
.card-footer a:hover { text-decoration: underline; }

.terms {
    text-align: center;
    font-size: 12px;
    color: #c0c0c0;
    margin-top: 12px;
    line-height: 1.6;
}
.terms a { color: #c0c0c0; text-decoration: underline; }

@media (max-width: 900px) {
    .cadastro-page { background: #fce8e8; justify-content: flex-start; overflow: visible; min-height: 100vh; }
    .auth-inner { justify-content: center; align-items: center; min-height: unset; padding: 40px 20px; }
    .blob { display: none; }
    .illustration { display: none; }
    .top-logo { display: none; }
    .card-wrap { width: 100%; max-width: 420px; padding: 0; }
    .continue-as { width: 100%; box-sizing: border-box; }
}

.card-logo-area {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1.5px solid var(--border);
}

.card-logo {
    height: 44px;
    width: auto;
    mix-blend-mode: multiply;
}

@media (max-width: 900px) {
    .card-logo-area { display: flex; }
}


@media (max-width: 480px) {
    .card-flipper { width: 100%; }
    .card { padding: 28px 22px; width: 100%; border-radius: 20px; }
    .card-flipper { filter: drop-shadow(0 8px 32px rgba(0, 0, 0, .12)); }
    .card h1 { font-size: 22px; }
    .card-sub { margin-bottom: 16px; }
    .card-logo-area { gap: 10px; margin-bottom: 20px; padding-bottom: 16px; }
    .card-logo { height: 36px; }
    .btn-social { padding: 11px 16px; margin-bottom: 8px; font-size: 13px; }
    #form-cadastro, #form-login { gap: 8px; }
    #form-cadastro input, #form-login input { padding: 11px 12px; font-size: 14px; }
    #form-cadastro button, #form-login button { padding: 12px; font-size: 14px; }
    .divider { margin: 10px 0; }
    .card-footer { margin-top: 14px; font-size: 13px; }
    .terms { margin-top: 10px; }
}
