/**
 * Authentication Styles for for10.cloud
 * Matches the main site's premium purple theme
 */

/* Login Page Container */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 10;
}

/* Login Card */
.login-card {
    background: linear-gradient(135deg,
            rgba(26, 27, 38, 0.9) 0%,
            rgba(42, 45, 58, 0.7) 100%);
    border: 1px solid rgba(157, 78, 221, 0.2);
    border-radius: 28px;
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    backdrop-filter: blur(30px) saturate(200%);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.5),
        0 12px 32px rgba(157, 78, 221, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    text-align: center;
}

/* Login Logo */
.login-logo {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-size: 56px;
    font-weight: 700;
    background: linear-gradient(135deg, #9D4EDD 0%, #E9D8FD 50%, #7B2CBF 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    margin-bottom: 12px;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #E9D8FD;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 15px;
    color: #A0AEC0;
    margin-bottom: 40px;
}

/* Google Sign In Button */
.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    padding: 16px 28px;
    background: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.15);
}

.google-signin-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.2);
}

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

.google-signin-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.google-icon {
    width: 22px;
    height: 22px;
}

/* Error Message */
.error-message {
    display: none;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #FCA5A5;
    padding: 14px 20px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 14px;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 11, 20, 0.9);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    flex-direction: column;
    gap: 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(157, 78, 221, 0.2);
    border-top-color: #9D4EDD;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #E9D8FD;
    font-size: 16px;
    font-weight: 500;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #B794F6;
    text-decoration: none;
    font-size: 14px;
    margin-top: 32px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #E9D8FD;
}

/* Warning Note - Subtle */
.warning-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.warning-note:hover {
    opacity: 1;
}

.warning-icon {
    font-size: 12px;
}

.warning-text {
    font-size: 10px;
    color: #9699A3;
    line-height: 1.4;
}

.warning-text strong {
    color: #FCA5A5;
}

/* ============== */
/* Avatar Button (for index.html) */
/* ============== */

.user-avatar-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg,
            rgba(26, 27, 38, 0.9) 0%,
            rgba(42, 45, 58, 0.7) 100%);
    border: 2px solid rgba(157, 78, 221, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.user-avatar-btn:hover {
    border-color: rgba(157, 78, 221, 0.6);
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(157, 78, 221, 0.25);
}

.user-avatar-btn.signed-in {
    border-color: #9D4EDD;
}

.avatar-icon {
    width: 24px;
    height: 24px;
    fill: #B794F6;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: none;
}

/* User Menu Dropdown */
.user-menu {
    position: absolute;
    top: 76px;
    right: 20px;
    background: linear-gradient(135deg,
            rgba(26, 27, 38, 0.98) 0%,
            rgba(42, 45, 58, 0.95) 100%);
    border: 1px solid rgba(157, 78, 221, 0.25);
    border-radius: 16px;
    padding: 16px;
    min-width: 220px;
    z-index: 101;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(157, 78, 221, 0.15);
    margin-bottom: 12px;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    color: #E9D8FD;
    margin-bottom: 4px;
}

.user-email {
    font-size: 13px;
    color: #A0AEC0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    color: #C4B5FD;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.menu-item:hover {
    background: rgba(157, 78, 221, 0.15);
    color: #E9D8FD;
}

.menu-item svg {
    width: 18px;
    height: 18px;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .login-card {
        padding: 40px 28px;
        border-radius: 24px;
    }

    .login-logo {
        font-size: 48px;
    }

    .login-title {
        font-size: 20px;
    }

    .user-avatar-btn {
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
    }

    .user-menu {
        right: 16px;
        top: 68px;
    }
}