@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Animated Background */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 25s infinite ease-in-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(102, 126, 234, 0.4) 100%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 550px;
    height: 550px;
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.4) 0%, rgba(255, 255, 255, 0.2) 100%);
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.orb-3 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

.orb-4 {
    width: 450px;
    height: 450px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(102, 126, 234, 0.35) 100%);
    bottom: 20%;
    left: 5%;
    animation-delay: 15s;
}

.mesh-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    animation: meshMove 30s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(40px, -40px) scale(1.05);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.95);
    }
}

@keyframes meshMove {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-15px, -15px);
    }
}

/* Login Container - Light Glassmorphism */
.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 20px 60px rgba(102, 126, 234, 0.3),
        0 8px 24px rgba(118, 75, 162, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    max-width: 480px;
    width: 100%;
    padding: 60px 50px;
    position: relative;
    z-index: 10;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(102, 126, 234, 0.3), 
        transparent
    );
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Logo Section */
.logo {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.brand-logo {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    line-height: 1;
    position: relative;
}

.brand-name {
    font-size: 58px;
    font-weight: 800;
    letter-spacing: -3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: shimmer 3s ease-in-out infinite;
    position: relative;
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.product-name {
    font-size: 58px;
    font-weight: 700;
    letter-spacing: -2px;
    color: #333;
    position: relative;
}

.product-name::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(102, 126, 234, 0.5), 
        rgba(118, 75, 162, 0.5), 
        transparent
    );
    border-radius: 2px;
    opacity: 0.8;
    animation: underlinePulse 2s ease-in-out infinite;
}

@keyframes underlinePulse {
    0%, 100% {
        opacity: 0.8;
        transform: scaleX(1);
    }
    50% {
        opacity: 1;
        transform: scaleX(1.05);
    }
}

.logo .tagline {
    color: #666;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-top: 12px;
    text-transform: uppercase;
    font-size: 13px;
}

/* Welcome Text */
.welcome-text {
    text-align: center;
    margin-bottom: 35px;
}

.welcome-text h2 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.welcome-text p {
    color: #666;
    font-size: 15px;
    font-weight: 400;
}

/* Alert Messages */
.alert {
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    font-size: 18px;
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.3);
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border-color: rgba(39, 174, 96, 0.3);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
    border-color: rgba(243, 156, 18, 0.3);
}

.alert-info {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-color: rgba(52, 152, 219, 0.3);
}

/* Invitation Notice */
.invitation-notice {
    background: linear-gradient(135deg, 
        rgba(255, 193, 7, 0.15) 0%, 
        rgba(255, 152, 0, 0.15) 100%
    );
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-left: 4px solid #ffc107;
    padding: 18px 20px;
    margin: 30px 0;
    border-radius: 16px;
    font-size: 14px;
    color: #856404;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.invitation-notice::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;
}

.invitation-notice:hover::before {
    left: 100%;
}

.invitation-notice:hover {
    box-shadow: 0 6px 24px rgba(255, 193, 7, 0.25);
    transform: translateY(-2px);
    border-color: rgba(255, 193, 7, 0.6);
}

.invitation-notice i {
    margin-right: 12px;
    color: #ffc107;
    font-size: 18px;
}

.invitation-notice strong {
    font-weight: 600;
    color: #856404;
}

/* OAuth Buttons */
.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 35px;
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px 28px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    background: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: #333;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-oauth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(102, 126, 234, 0.1), 
        transparent
    );
    transition: left 0.5s;
}

.btn-oauth:hover::before {
    left: 100%;
}

.btn-oauth:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.btn-oauth:active {
    transform: translateY(-1px);
}

.btn-oauth i {
    font-size: 22px;
    transition: transform 0.3s;
}

.btn-oauth:hover i {
    transform: scale(1.1);
}

.btn-oauth.google {
    border-color: rgba(66, 133, 244, 0.5);
    background: white;
}

.btn-oauth.google:hover {
    border-color: #4285f4;
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.05) 0%, rgba(66, 133, 244, 0.1) 100%);
    box-shadow: 0 8px 24px rgba(66, 133, 244, 0.25);
}

.btn-oauth.microsoft {
    border-color: rgba(0, 164, 239, 0.5);
    background: white;
}

.btn-oauth.microsoft:hover {
    border-color: #00a4ef;
    background: linear-gradient(135deg, rgba(0, 164, 239, 0.05) 0%, rgba(0, 164, 239, 0.1) 100%);
    box-shadow: 0 8px 24px rgba(0, 164, 239, 0.25);
}

.google-icon {
    color: #4285f4;
}

.microsoft-icon {
    color: #00a4ef;
}

/* Footer */
.footer {
    margin-top: 45px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer i {
    color: var(--primary-color);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 500px) {
    body {
        padding: 15px;
    }
    
    .login-container {
        padding: 40px 30px;
        border-radius: 24px;
    }
    
    .logo {
        margin-bottom: 35px;
    }
    
    .brand-name,
    .product-name {
        font-size: 42px;
    }
    
    .logo .tagline {
        font-size: 12px;
    }
    
    .welcome-text {
        margin-bottom: 25px;
    }
    
    .welcome-text h2 {
        font-size: 24px;
    }
    
    .welcome-text p {
        font-size: 14px;
    }
    
    .oauth-buttons {
        gap: 14px;
        margin-top: 25px;
    }
    
    .btn-oauth {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .btn-oauth i {
        font-size: 20px;
    }
    
    .invitation-notice {
        padding: 14px 16px;
        font-size: 13px;
        margin: 20px 0;
    }
    
    .orb-1, .orb-2, .orb-3, .orb-4 {
        filter: blur(70px);
    }
}

@media (max-width: 380px) {
    .login-container {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .brand-name,
    .product-name {
        font-size: 34px;
    }
    
    .logo .tagline {
        font-size: 11px;
    }
    
    .btn-oauth {
        padding: 12px 16px;
        font-size: 14px;
        gap: 10px;
    }
    
    .btn-oauth i {
        font-size: 18px;
    }
    
    .invitation-notice {
        padding: 12px 14px;
        font-size: 12px;
    }
}
