* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #4a90e2;
    --primary-purple: #9b59b6;
    --dark-bg: #0a0e27;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --input-bg: rgba(255, 255, 255, 0.1);
    --input-border: rgba(255, 255, 255, 0.2);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-blue: linear-gradient(135deg, #4a90e2 0%, #9b59b6 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1419 100%);
    z-index: -1;
}

.background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.background::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(155, 89, 182, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.login-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    padding: 20px;
    z-index: 1;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 32px;
}

.shield-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-blue);
    border-radius: 16px;
    font-size: 32px;
    color: white;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.4);
}

.system-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.system-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    border-radius: 12px;
}

.tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
}

.tab i {
    font-size: 14px;
}

.tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.tab.active {
    background: var(--gradient-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.form-container {
    display: none;
}

.form-container.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.input-group input::placeholder {
    color: var(--text-secondary);
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    z-index: 1;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--text-primary);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-blue);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 8px;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(74, 144, 226, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.telegram-info {
    text-align: center;
    padding: 40px 20px;
}

.telegram-icon {
    font-size: 64px;
    color: #0088cc;
    margin-bottom: 20px;
}

.telegram-info p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 15px;
}

.telegram-btn {
    padding: 14px 32px;
    background: #0088cc;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.telegram-btn:hover {
    background: #0077b5;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 136, 204, 0.3);
}

.footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    font-size: 12px;
    color: var(--text-secondary);
}

.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.lang-btn {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-blue);
}

.lang-btn.active {
    background: var(--gradient-blue);
    border-color: transparent;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    background: rgba(231, 76, 60, 0.9);
}

.toast.success {
    background: rgba(46, 204, 113, 0.9);
}

/* 响应式设计 */
@media (max-width: 600px) {
    .login-card {
        padding: 32px 24px;
    }
    
    .system-title {
        font-size: 28px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        width: 100%;
    }
    
    .language-switcher {
        top: 10px;
        right: 10px;
        flex-direction: column;
    }
    
    .lang-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
}

