/* Authentication Styles */
.auth-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75); /* Darker premium overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeInOverlay 0.4s ease-out;
}

.auth-content {
    background: white;
    padding: 40px 30px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
    will-change: transform, opacity;
    animation: popInModal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy premium intro */
}

.auth-logo-icon {
    background: #eff4ff;
    color: #4285f4;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 16px rgba(66, 133, 244, 0.15);
}

.auth-content h3 {
    color: #1e293b;
    margin: 0 0 12px 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.auth-content p {
    color: #64748b;
    margin: 0 0 30px 0;
    line-height: 1.6;
    font-size: 1rem;
}

.google-signin-btn {
    background: white;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.google-signin-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.google-signin-btn:active {
    background: #f1f5f9;
    transform: translateY(0);
}

.google-signin-btn img {
    align-self: center;
}

.auth-footer {
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

/* New Premium Animations */
@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popInModal {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Subtle animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.user-profile {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    animation: slideInRight 0.5s ease-out;
    /* New Special Animation */
    transform: scale(0);
    animation: popInProfile 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.4);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.profile-pic:hover {
    transform: scale(1.1);
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.6);
    border-color: var(--primary-color);
}

/* Special Pop-in Animation */
@keyframes popInProfile {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Profile Modal Styles */
.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
    width: 90%;
    max-width: 350px;
    position: relative;
    border: 1px solid #e0e0e0;
    animation: slideInModal 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background-color: #f5f5f5;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    margin: 0 auto;
    display: block;
}

.modal-body {
    text-align: center;
    margin-bottom: 25px;
}

.modal-user-name {
    color: var(--primary-color);
    margin: 15px 0 5px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-user-email {
    color: var(--light-text);
    font-size: 0.9rem;
    margin: 0;
}

.modal-footer {
    display: flex;
    justify-content: center;
}

.modal-signout-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.modal-signout-btn:hover {
    background: #c53030;
    transform: scale(1.05);
}

/* Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInModal {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design for Auth */
@media (max-width: 768px) {
    .auth-container {
        padding: 20px;
    }

    .auth-content {
        padding: 25px 20px;
        width: 85%;
        max-width: 320px;
        border-radius: 20px;
        margin: 0 auto;
    }

    .auth-content h3 {
        font-size: 1.25rem;
    }

    .auth-content p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .google-signin-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .user-profile {
        top: 15px;
        right: 15px;
        padding: 15px;
    }

    .profile-pic {
        width: 35px;
        height: 35px;
    }

    .profile-info h3 {
        font-size: 1rem;
    }

    .signout-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .auth-content {
        padding: 20px 15px;
        width: 92%;
    }
    .auth-logo-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 15px;
    }
}

/* Terms of Service Section Styles */
.tos-section {
    margin: 15px 0 25px 0;
    text-align: left;
    background: #f8fafc;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.tos-summary {
    font-size: 0.9rem !important;
    color: #475569 !important;
    margin: 0 0 8px 0 !important;
    line-height: 1.5 !important;
}

.learn-more-link {
    display: inline-block;
    font-size: 0.9rem;
    color: #4285f4;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 18px;
}

.learn-more-link:hover {
    text-decoration: underline;
}

.tos-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.tos-checkbox-label input {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4285f4;
}

.tos-checkbox-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
}

.tos-error-msg {
    color: #dc2626;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 12px;
    display: none;
    background: #fef2f2;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #dc2626;
    animation: fadeIn 0.3s ease-in;
}