:root {
    --primary-dark: #1a4d2e;
    --primary: #2e7d32;
    --primary-light: #4caf50;
    --accent: #ff6f00;
    --earth-dark: #3e2723;
    --earth: #5d4037;
    --cream: #f5f0e6;
    --cream-light: #faf8f3;
    --text-dark: #2d1810;
    --text: #4a3728;
    --text-light: #7a6c5d;
    --shadow-soft: 0 2px 20px rgba(26, 77, 46, 0.08);
    --shadow-medium: 0 8px 40px rgba(26, 77, 46, 0.12);
    --shadow-strong: 0 16px 60px rgba(26, 77, 46, 0.18);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 999px;
    --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f0e6 0%, #e8e0d5 50%, #faf8f3 100%);
    position: relative;
    overflow: hidden;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-wrapper {
    animation: fadeInUp 0.8s ease;
}

.bg-decoration {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.deco-circle-1 {
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.15) 0%, transparent 70%);
    top: -150px;
    left: -150px;
    animation: float 20s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.deco-circle-2 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 111, 0, 0.1) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation: float 25s ease-in-out infinite reverse;
    transition: transform 0.3s ease;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 30px) scale(1.05); }
}

.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    pointer-events: none;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 900px;
    padding: 30px 20px;
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

.brand-section {
    background: linear-gradient(180deg, rgba(26, 77, 46, 0.85) 0%, rgba(46, 125, 50, 0.85) 50%, rgba(76, 175, 80, 0.85) 100%);
    background-image: url('../../img/login.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
    padding: 45px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.brand-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 77, 46, 0.25);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background-image: url('../../img/logo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    text-indent: -9999px;
    position: relative;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    z-index: -1;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.brand-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 24px;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
}

.brand-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    letter-spacing: 3px;
    margin-top: 4px;
}

.brand-hero {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-heading {
    font-family: 'Noto Serif SC', serif;
    font-size: 32px;
    font-weight: 600;
    color: white;
    line-height: 1.3;
    margin-bottom: 20px;
}

.hero-heading span {
    display: block;
    font-size: 36px;
    background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    margin-bottom: 30px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.brand-footer {
    position: relative;
    z-index: 1;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.stat-row {
    display: flex;
    gap: 40px;
}

.stat-item {
    text-align: left;
}

.stat-number {
    font-family: 'Noto Serif SC', serif;
    font-size: 26px;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    letter-spacing: 1px;
    margin-top: 4px;
}

.form-section {
    padding: 45px 35px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-tabs {
    display: flex;
    gap: 6px;
    background: var(--cream);
    padding: 5px;
    border-radius: var(--radius-full);
    margin-bottom: 24px;
    position: relative;
}

.form-tabs::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 5px);
    background: white;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(26, 77, 46, 0.1),
                0 0 0 1px rgba(26, 77, 46, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.form-tabs.tab-right::before {
    transform: translateX(calc(100% + 2px));
}

.tab-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: var(--radius-full);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
}

.tab-btn:hover {
    color: var(--text);
    transform: scale(1.02);
}

.tab-btn.active {
    color: var(--primary);
    font-weight: 600;
    animation: tabActive 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes tabActive {
    0% {
        transform: scale(0.95);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.form-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 13px;
    color: var(--text-light);
}

.form-content {
    flex: 1;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-light);
    transition: var(--transition-smooth);
    pointer-events: none;
}

.input-icon.username {
    width: 20px;
    height: 20px;
    background-image: url('https://huinonglian.oss-cn-guangzhou.aliyuncs.com/%E5%9B%BE%E6%A0%87/%E5%A7%93%E5%90%8D.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px;
}

.input-icon.password {
    width: 20px;
    height: 20px;
    background-image: url('https://huinonglian.oss-cn-guangzhou.aliyuncs.com/%E5%9B%BE%E6%A0%87/%E5%AF%86%E7%A0%81.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px;
}

.input-icon.real-name {
    width: 20px;
    height: 20px;
    background-image: url('https://huinonglian.oss-cn-guangzhou.aliyuncs.com/%E5%9B%BE%E6%A0%87/%E7%9C%9F%E5%AE%9E%E5%A7%93%E5%90%8D.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px;
}

.input-icon.captcha {
    width: 20px;
    height: 20px;
    background-image: url('https://huinonglian.oss-cn-guangzhou.aliyuncs.com/%E5%9B%BE%E6%A0%87/%E9%AA%8C%E8%AF%81%20%E9%AA%8C%E8%AF%81%E7%A0%81.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px;
}

.input-icon.phone {
    width: 20px;
    height: 20px;
    background-image: url('https://huinonglian.oss-cn-guangzhou.aliyuncs.com/%E5%9B%BE%E6%A0%87/%E6%89%8B%E6%9C%BA%E5%8F%B7%E7%A0%81.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px;
}

.form-input {
    width: 100%;
    padding: 13px 13px 13px 45px;
    border: 2px solid #e8e0d5;
    border-radius: var(--radius-md);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--cream-light);
    transition: var(--transition-smooth);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1),
                0 4px 12px rgba(46, 125, 50, 0.15);
    transform: translateY(-1px);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

.captcha-row {
    display: flex;
    gap: 12px;
}

.captcha-row .form-input {
    flex: 1;
}

.captcha-box {
    width: 100px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Serif SC', serif;
    font-size: 20px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
    letter-spacing: 4px;
}

.captcha-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.3);
}

.captcha-box:active {
    transform: translateY(0);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.forgot-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 13px 28px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: white;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(46, 125, 50, 0.35);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.submit-btn.loading .btn-text {
    visibility: hidden;
}

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.submit-btn.loading .spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 32px 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8e0d5;
}

.form-divider span {
    font-size: 13px;
    color: var(--text-light);
}

.social-login {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    padding: 14px;
    border: 2px solid #e8e0d5;
    border-radius: var(--radius-md);
    background: white;
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.page-footer {
    margin-top: auto;
    padding-top: 30px;
    text-align: center;
}

.footer-text {
    font-size: 12px;
    color: var(--text-light);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.footer-links a {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--primary);
}

.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}

.alert-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.alert-modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 350px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-strong);
    animation: slideUp 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.alert-icon.success {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
}

.alert-icon.error {
    background: linear-gradient(135deg, #e74c3c, #c62828);
    color: white;
}

.alert-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.alert-message {
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 24px;
}

.alert-button {
    padding: 12px 32px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.alert-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.3);
}

@media (max-width: 968px) {
    .login-wrapper {
        grid-template-columns: 1fr;
    }

    .brand-section {
        display: none;
    }

    .form-section {
        padding: 40px 24px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 20px 12px;
    }

    .form-section {
        padding: 32px 20px;
    }

    .form-title {
        font-size: 24px;
    }

    .hero-heading {
        font-size: 32px;
    }

    .hero-heading span {
        font-size: 36px;
    }
}

.form-panel {
    display: none;
}

.form-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}
