/* ============================================
   Auth Page — Login / Register (Standalone)
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    overflow: hidden;
}

.auth-page {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(224, 122, 95, 0.3) 0%, rgba(129, 178, 154, 0.3) 100%),
        url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&q=80') center/cover no-repeat;
    background-color: #81b29a;
    z-index: 0;
    transition: opacity 0.5s ease, background 0.5s ease;
    opacity: 1;
}

.auth-bg.register-bg {
    background: 
        linear-gradient(135deg, rgba(129, 178, 154, 0.3) 0%, rgba(242, 204, 143, 0.3) 100%),
        url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=1920&q=80') center/cover no-repeat;
    background-color: #81b29a;
}

.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.auth-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    padding: 10px;
    max-height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.auth-container::-webkit-scrollbar {
    display: none;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px 28px;
}

.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-logo-link {
    display: block;
    width: 100%;
    max-width: 120px;
    margin: 0 auto 12px;
}

.auth-logo {
    width: 100%;
    height: auto;
    border-radius: 16px;
    object-fit: contain;
    display: block;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: #7c8a97;
}

.auth-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
}

.auth-msg-error {
    background: #fef2f2;
    color: #e74c3c;
    border: 1px solid #fecaca;
}

.auth-msg-success {
    background: #f0fdf4;
    color: #4caf50;
    border: 1px solid #bbf7d0;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 1px solid #e8e6e1;
}

.auth-tab {
    flex: 1;
    padding: 12px 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 15px;
    font-weight: 500;
    color: #7c8a97;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.auth-tab:hover {
    color: #2d3436;
}

.auth-tab.active {
    color: #e07a5f;
    border-bottom-color: #e07a5f;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.auth-form:first-of-type {
    display: flex;
}

.auth-field {
    display: flex;
    flex-direction: column;
}

.auth-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    color: #2d3436;
    background: #faf9f6;
    border: 1px solid #e8e6e1;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease;
}

.auth-input:focus {
    border-color: #e07a5f;
}

.auth-input::placeholder {
    color: #b0b8c1;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrap .auth-input {
    padding-right: 44px;
}

.auth-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #7c8a97;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-eye:hover {
    color: #2d3436;
}

.auth-code-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #e07a5f;
    background: none;
    border: 1px solid #e07a5f;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s ease, color 0.3s ease;
}

.auth-code-btn:hover {
    background: #e07a5f;
    color: #fff;
}

.auth-code-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #7c8a97;
    cursor: pointer;
}

.auth-check input[type="checkbox"] {
    accent-color: #e07a5f;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.auth-check a {
    color: #e07a5f;
    text-decoration: none;
}

.auth-check a:hover {
    text-decoration: underline;
}

.auth-check-agree {
    font-size: 12px;
    margin-top: 4px;
}

.auth-link {
    font-size: 13px;
    color: #e07a5f;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #e07a5f;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 8px;
}

.auth-btn:hover {
    background: #c4624a;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0 20px;
    color: #7c8a97;
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8e6e1;
}

.auth-oauth {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.auth-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #e8e6e1;
    border-radius: 8px;
    text-decoration: none;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-oauth-btn:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-oauth-qq:hover {
    border-color: #faad08;
}

.auth-oauth-alipay:hover {
    border-color: #079adf;
}

.auth-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 10px 24px;
    background: #2d3436;
    color: #fff;
    font-size: 14px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10000;
    pointer-events: none;
}

.auth-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px;
    }
    .auth-title {
        font-size: 22px;
    }
    .auth-oauth {
        gap: 12px;
    }
}
