/* Login Page Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #06b6d4;
    --primary-dark: #0891b2;
    --primary-light: #67e8f9;
    --purple: #8b5cf6;
    --bg-left: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --bg-right: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --input-bg: #f8fafc;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-right);
    min-height: 100vh;
}

.login-container {
    display: flex;
    min-height: 100vh;
}

/* Left Side - Brand & Illustration */
.login-left {
    flex: 1;
    background: var(--bg-left);
    display: flex;
    flex-direction: column;
    padding: 32px 40px;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.brand-header {
    position: relative;
    z-index: 2;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.5);
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
}

/* Isometric Illustration */
.illustration {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    min-height: 0;
}

.iso-scene {
    width: 320px;
    height: 320px;
    position: relative;
}

.iso-platform {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
}

.iso-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(6, 182, 212, 0.2) 1px, transparent 1px),
        linear-gradient(rgba(6, 182, 212, 0.2) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: rotateX(60deg) rotateZ(45deg);
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

.iso-cube {
    position: absolute;
    transform-style: preserve-3d;
    animation: float 3s ease-in-out infinite;
}

.iso-cube.main-cube {
    width: 80px;
    height: 80px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotateX(-20deg) rotateY(45deg);
}

.iso-cube.small-cube {
    width: 40px;
    height: 40px;
    animation-delay: var(--delay);
    transform: translate(var(--x), -50%) rotateX(-20deg) rotateY(45deg);
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) rotateX(-20deg) rotateY(45deg) translateY(0); }
    50% { transform: translate(-50%, -50%) rotateX(-20deg) rotateY(45deg) translateY(-20px); }
}

.cube-face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.9), rgba(139, 92, 246, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cube-face.front { transform: rotateY(0deg) translateZ(40px); }
.cube-face.back { transform: rotateY(180deg) translateZ(40px); }
.cube-face.top { transform: rotateX(90deg) translateZ(40px); background: rgba(103, 232, 249, 0.9); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(40px); }
.cube-face.left { transform: rotateY(-90deg) translateZ(40px); }
.cube-face.right { transform: rotateY(90deg) translateZ(40px); }

.small-cube .cube-face.front { transform: rotateY(0deg) translateZ(20px); }
.small-cube .cube-face.top { transform: rotateX(90deg) translateZ(20px); }
.small-cube .cube-face.left { transform: rotateY(-90deg) translateZ(20px); }
.small-cube .cube-face.right { transform: rotateY(90deg) translateZ(20px); }

.iso-person {
    position: absolute;
    bottom: 30%;
    left: 30%;
    animation: personMove 4s ease-in-out infinite;
}

@keyframes personMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}

.person-body {
    width: 30px;
    height: 50px;
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
    border-radius: 8px;
}

.person-head {
    width: 20px;
    height: 20px;
    background: #fbbf24;
    border-radius: 50%;
    margin: 0 auto 5px;
}

.iso-screen {
    position: absolute;
    right: 20%;
    top: 30%;
    width: 80px;
    height: 60px;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 8px;
    border: 2px solid rgba(6, 182, 212, 0.5);
    padding: 8px;
    animation: screenPulse 2s ease-in-out infinite;
}

@keyframes screenPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(6, 182, 212, 0.3); }
    50% { box-shadow: 0 0 30px rgba(6, 182, 212, 0.6); }
}

.screen-content {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 100%;
}

.chart-bar {
    width: 12px;
    background: linear-gradient(180deg, var(--primary), var(--purple));
    border-radius: 2px;
    animation: barGrow 1.5s ease-in-out infinite;
}

.chart-bar:nth-child(1) { height: 40%; animation-delay: 0s; }
.chart-bar:nth-child(2) { height: 70%; animation-delay: 0.2s; }
.chart-bar:nth-child(3) { height: 55%; animation-delay: 0.4s; }

@keyframes barGrow {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.2); }
}

.iso-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: particleFloat 3s ease-in-out infinite;
}

.p1 { top: 20%; left: 20%; animation-delay: 0s; }
.p2 { top: 40%; right: 20%; animation-delay: 0.5s; }
.p3 { bottom: 30%; left: 30%; animation-delay: 1s; }
.p4 { top: 60%; right: 30%; animation-delay: 1.5s; }

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
    50% { transform: translateY(-30px) scale(1.2); opacity: 0.7; }
}

.brand-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    margin-top: auto;
}

.brand-footer h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.brand-footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Right Side - Login Form */
.login-right {
    flex: 1;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    padding: 32px 40px;
    position: relative;
    overflow: hidden;
}

.login-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: var(--input-bg);
    color: var(--text-primary);
}

.login-form-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Login Panels */
.login-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.login-panel.active {
    display: block;
}

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

.phone-icon {
    font-size: 1.5rem;
    margin-left: 8px;
}

.rocket {
    font-size: 1.5rem;
    margin-left: 8px;
}

.key {
    font-size: 1.5rem;
    margin-left: 8px;
}

/* Compact form for panels with more fields */
.form-header.compact {
    margin-bottom: 20px;
}

.form-header.compact h1 {
    font-size: 1.6rem;
}

.login-form.compact {
    gap: 12px;
}

.login-form.compact .form-group {
    margin-bottom: 0;
}

/* Terms text */
.terms-text {
    font-size: 0.85rem;
}

.terms-text a {
    color: var(--primary);
    text-decoration: none;
}

.terms-text a:hover {
    text-decoration: underline;
}

/* Code Input Group */
.code-input-group {
    display: flex;
    gap: 12px;
}

.code-input {
    flex: 1;
    letter-spacing: 8px;
    text-align: center;
    font-size: 1.2rem;
}

/* PIN Input Group - 6 digit verification */
.pin-input-group {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.pin-input {
    width: 44px;
    height: 52px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.pin-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.pin-input::placeholder {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Full width code button */
.code-btn.full-width {
    width: 100%;
    padding: 14px;
}

.code-btn {
    padding: 14px 24px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.code-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.05);
}

.code-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.code-btn.countdown {
    color: var(--text-muted);
}

/* Back Button */
.back-btn {
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.back-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* Active Tab */
.tab-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.form-header {
    margin-bottom: 24px;
}

.form-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wave {
    font-size: 2rem;
    animation: wave 1s ease-in-out infinite;
    display: inline-block;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

.form-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    position: relative;
}

.form-input,
.form-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Input hint text */
.input-hint {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.select-wrapper {
    position: relative;
}

.form-select {
    appearance: none;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.input-with-action {
    position: relative;
}

.input-action {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.input-action:hover {
    color: var(--primary);
}

/* Slider Captcha */
.slider-captcha {
    position: relative;
    height: 44px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
}

.slider-track {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-bg {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transition: width 0.1s ease;
}

.slider-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    z-index: 1;
}

.slider-btn {
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    z-index: 2;
}

.slider-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.slider-btn.success {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.slider-btn.success svg {
    display: none;
}

.slider-btn.success::after {
    content: '✓';
    font-size: 1.2rem;
    font-weight: bold;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-custom::after {
    content: '✓';
    color: #ffffff;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.checkbox-input:checked + .checkbox-custom::after {
    opacity: 1;
}

.checkbox-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--primary-dark);
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Other Login Methods */
.other-login {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.login-tabs {
    display: flex;
    gap: 12px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 16px;
}

/* Social Login */
.social-login {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-btn {
    width: 48px;
    height: 48px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.social-btn.wechat {
    color: #07c160;
}

.social-btn.wechat:hover {
    background: #07c160;
    color: #ffffff;
    border-color: #07c160;
}

.social-btn.qq {
    color: #12b7f5;
}

.social-btn.qq:hover {
    background: #12b7f5;
    color: #ffffff;
    border-color: #12b7f5;
}

.social-btn.github {
    color: #333333;
}

.social-btn.github:hover {
    background: #333333;
    color: #ffffff;
    border-color: #333333;
}

.social-btn.google {
    color: #ea4335;
}

.social-btn.google:hover {
    background: #ea4335;
    color: #ffffff;
    border-color: #ea4335;
}

/* Register Link */
.register-link {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Login Footer */
.login-footer {
    margin-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .login-left {
        display: none;
    }
    
    .login-right {
        max-width: 100%;
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .login-right {
        padding: 20px;
    }
    
    .form-header h1 {
        font-size: 1.6rem;
    }
    
    .login-tabs {
        flex-direction: column;
    }
}
