:root {
    --gold: #D4AF37;
    --dark-gold: #B8941E;
    --light-gold: #F4E4B4;
    --primary: #1565C0;
    --primary-light: #42A5F5;
    --secondary: #5E35B1;
    --white: #FFFFFF;
    --light-bg: #F5F7FA;
    --lighter-bg: #FAFBFC;
    --text-primary: #2C3E50;
    --text-secondary: #6C757D;
    --danger: #EF5350;
    --border-color: #E0E6ED;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    overflow: hidden;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    animation: float 25s infinite ease-in-out;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    top: 40%;
    right: -120px;
    animation-delay: 3s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    bottom: -100px;
    left: 25%;
    animation-delay: 6s;
}

.shape-4 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    top: 15%;
    left: 45%;
    animation-delay: 9s;
}

.shape-5 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    bottom: 25%;
    right: 25%;
    animation-delay: 12s;
}

.animated-bg::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(74, 144, 226, 0.03) 0%, transparent 50%);
    animation: breathe 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        transform: translate(60px, -40px) scale(1.15) rotate(90deg);
    }
    50% {
        transform: translate(-40px, 50px) scale(0.9) rotate(180deg);
    }
    75% {
        transform: translate(50px, 30px) scale(1.1) rotate(270deg);
    }
}

@keyframes breathe {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.login-container {
    width: 100%;
    max-width: 460px;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 50px 45px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: slideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    font-size: 72px;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.2));
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

.app-name {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold) 0%, var(--dark-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -1px;
    animation: shimmer 3s infinite;
    background-size: 200% auto;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

.app-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.login-form {
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 24px;
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

.form-group:nth-child(1) { animation-delay: 0.2s; }
.form-group:nth-child(2) { animation-delay: 0.3s; }
.form-group:nth-child(3) { animation-delay: 0.4s; }

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

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

.input-icon {
    position: absolute;
    left: 18px;
    font-size: 20px;
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}

.form-group input:focus ~ .input-icon,
.input-wrapper:hover .input-icon {
    transform: scale(1.1);
}

.form-group input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-group input:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.1);
    background: var(--lighter-bg);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: #A0AEC0;
}

.btn {
    padding: 16px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--dark-gold) 100%);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.25);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.35);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    font-size: 22px;
    transition: transform 0.3s ease;
}

.btn:hover .btn-icon {
    transform: translateX(6px);
}

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 22px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.5s ease;
}

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

.alert-error {
    background: rgba(239, 83, 80, 0.08);
    border: 1px solid rgba(239, 83, 80, 0.2);
    color: var(--danger);
}

.alert-icon {
    font-size: 20px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.login-footer {
    margin-top: 28px;
    animation: fadeIn 0.6s ease 0.5s forwards;
    opacity: 0;
}

.demo-info {
    background: linear-gradient(135deg, rgba(21, 101, 192, 0.05) 0%, rgba(94, 53, 177, 0.05) 100%);
    padding: 18px;
    border-radius: 12px;
    border: 1px solid rgba(21, 101, 192, 0.1);
    text-align: center;
}

.demo-info p {
    margin: 5px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.demo-info strong {
    color: var(--primary);
    font-weight: 700;
}

.powered-by {
    text-align: center;
    margin-top: 28px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: fadeIn 0.6s ease 0.6s forwards;
    opacity: 0;
}

.powered-by p {
    color: var(--text-primary);
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

.powered-by strong {
    background: linear-gradient(135deg, var(--gold) 0%, var(--dark-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 16px;
}

@media (max-width: 480px) {
    .login-box {
        padding: 40px 30px;
    }
    
    .app-name {
        font-size: 30px;
    }
    
    .logo-icon {
        font-size: 60px;
    }
    
    .shape {
        filter: blur(40px);
        opacity: 0.1;
    }
}