* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(to bottom, #2d2d35 0%, #000000 100%);
    color: #f5f5f7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.logo-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 16px 8px;
    flex-shrink: 0;
}

.logo-link {
    display: inline-block;
    transition: transform 0.2s ease;
}

.logo-link:hover { transform: scale(1.03); }
.logo-link:active { transform: scale(0.95); }

.logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    width: 100%;
}

.login-card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 10px;
    padding: 30px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.08);
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
    background: linear-gradient(to right, #86efac, #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-sub {
    text-align: center;
    font-size: 13px;
    color: #a0a0aa;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 14px;
}

#nameGroup {
    display: none;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #d0d0d8;
    margin-bottom: 4px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.35);
    color: #f5f5f7;
    font-size: 15px;
    transition: all 0.25s ease;
    outline: none;
    font-family: inherit;
}

.form-group input:focus {
    border-color: #22c55e;
    background: rgba(0,0,0,0.5);
    box-shadow: 0 0 0 3px rgba(34,197,94,0.15);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 80px;
}

.toggle-pwd {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #d0d0d8;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.toggle-pwd:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.btn-login {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 6px 20px rgba(34,197,94,0.25);
    margin-top: 6px;
    font-family: inherit;
}

.btn-login:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(34,197,94,0.35);
}

.btn-login:active { transform: scale(0.96); }

.btn-login:disabled {
    opacity: 0.65;
    cursor: wait;
}

.oauth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 12px;
    color: #7f8790;
    font-size: 12px;
}

.oauth-divider::before,
.oauth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(255,255,255,0.12);
}

.oauth-buttons { display: grid; gap: 9px; }
.oauth-login { margin-top: 4px; }
.recaptcha-container { display: flex; justify-content: center; min-height: 78px; margin: 14px 0 6px; }
.terms-note { margin-top: 13px; color: #8f9ba5; font-size: 12px; text-align: center; }
.terms-note a { color: #86efac; text-decoration: none; }
.terms-note a:hover { text-decoration: underline; }

.oauth-btn {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.oauth-btn:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.58); }
.oauth-btn:active { transform: scale(0.98); }
.oauth-google { background: rgba(255,255,255,0.08); }
.oauth-discord { background: rgba(88,101,242,0.28); }
.oauth-google img { width: 22px; height: 22px; object-fit: contain; }
.oauth-discord img { width: 25px; height: 25px; object-fit: contain; }

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 8px;
}

.form-footer a {
    color: #86efac;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.form-footer a:hover {
    color: #22c55e;
    border-bottom-color: #22c55e;
}

.form-footer .forgot-link {
    color: #a0a0aa;
    font-weight: 400;
    border-bottom: none;
}

#messageArea {
    display: none;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    text-align: center;
}

.footer {
    text-align: center;
    padding: 12px;
    font-size: 10px;
    color: #6e6e73;
    flex-shrink: 0;
    width: 100%;
}

@media (max-width: 768px) {
    .logo-img { height: 30px; }
    .logo-bar { padding: 12px 12px 4px; }
    .login-container { padding: 4px 8px; }
    .login-card { padding: 24px 18px; border-radius: 10px; }
    .login-title { font-size: 22px; }
    .login-sub { margin-bottom: 18px; }
    .form-group input {
        padding: 14px;
        font-size: 16px;
        border-radius: 8px;
        min-height: 48px;
    }
    .btn-login {
        padding: 16px;
        font-size: 17px;
        border-radius: 8px;
        min-height: 52px;
    }
    .footer { font-size: 8px; padding: 8px; }
}
