@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap");
@import url("./Unils/splashScreen.css");

:root {
    --primary: #6c63ff;
    --secondary: #ff6584;
    --light: #f8f9fa;
    --dark: #343a40;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Tajawal", sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.login-container {
    display: none;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 0.8s forwards;
}

.logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
    animation: pulse 2s infinite;
}

h1 {
    color: var(--dark);
    margin-bottom: 30px;
    font-weight: 700;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
    text-align: right;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: #f8f9fa;
}

.input-group input:focus {
    border-color: var(--primary);
    outline: none;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
}

.btn {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 15px;
    width: 100%;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(108, 99, 255, 0.6);
}

.btn:active {
    transform: translateY(0);
}

.links {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
}

.links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.links a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.floating-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

@keyframes fadeInUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.logo {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #e0e0e0;
}

#profile-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* أنماط الـ Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background: #333;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    animation: fadeInUp 0.3s;
}

.toast.success {
    background: #4CAF50;
}

.toast.error {
    background: #F44336;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0 0 0 10px;
}

/* Google Login Button Styles */
.google-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    direction: rtl;
    align-self: center;
}

.google-btn:hover {
    background-color: #f7f7f7;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.google-icon {
    width: 24px;
    height: 24px;
}

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-left: 5px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: larger;
    }

    label,
    .input-group input {
        font-size: 14px;
    }

    .btn {
        font-size: small;
    }

    .links a {
        font-size: small;
    }

    .login-container {
        box-shadow: 0 0px 0px rgba(0, 0, 0, 0.1);
        width: 100vw;
        min-height: 100vh;
    }

    body {
        background: white;
    }

    .toast {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
        max-width: unset;
        font-size: 0.85rem;
        padding: 0.75rem;
    }

    .google-btn {
        padding: 10px 16px;
        font-size: small;
        gap: 8px;
    }

    .google-icon {
        width: 20px;
        height: 20px;
    }
}