:root {
    --primary: #00f2ff;
    --secondary: #ff0055;
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --text-color: #e2e8f0;
}

body {
    margin: 0;
    background: #020205; /* Deep dark background */
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 242, 255, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(255, 0, 85, 0.08), transparent 25%);
}

/* المتحركات في الخلفية - Animated Ambient Blobs */
.background-blobs {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary), #0a192f);
    filter: blur(120px);
    border-radius: 50%;
    opacity: 0.5;
    animation: floatBlob 25s infinite alternate ease-in-out;
}

.blob:nth-child(2) {
    right: 5%;
    bottom: -10%;
    background: linear-gradient(135deg, var(--secondary), #4e0316);
    animation-delay: -10s;
    width: 400px;
    height: 400px;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15%, 15%) scale(1.1); }
    100% { transform: translate(-10%, 10%) scale(0.9); }
}

/* الكارد الزجاجي المميز */
.form-card {
    background: var(--glass);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    padding: 45px 40px;
    border-radius: 24px;
    width: 400px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8), inset 0 0 20px rgba(255,255,255,0.02);
    position: relative;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s;
}

.form-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(45deg, transparent, rgba(0, 242, 255, 0.3), transparent, rgba(255, 0, 85, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.form-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 242, 255, 0.15), inset 0 0 20px rgba(255,255,255,0.02);
}

.toggle-container {
    display: flex;
    background: rgba(0,0,0,0.4);
    padding: 6px;
    border-radius: 14px;
    margin-bottom: 35px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
}

.toggle-container button {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.4s ease;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
}

.toggle-container button.active {
    color: white;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Switch background animation indicator setup */
.toggle-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 10px;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.1);
    z-index: 1;
}

form h2 {
    margin: 0 0 10px;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

form p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.input-box {
    position: relative;
    margin-bottom: 22px;
}

.input-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #475569;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.input-box input {
    width: 100%;
    padding: 14px 14px 14px 50px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Focus Effects */
.input-box input:focus {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(0, 242, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

.input-box input:focus + i,
.input-box input:not(:placeholder-shown) + i {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.4);
}

/* Reverse DOM order to allow + selector for icons */
.input-box {
    display: flex;
    flex-direction: row-reverse;
}
.input-box input {
    flex-grow: 1;
}

.main-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary), #00a2ff);
    border: none;
    border-radius: 12px;
    color: #020205;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 242, 255, 0.3);
}

.main-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255,255,255,0.4);
    transform: rotate(30deg);
    transition: all 0.6s ease;
}

.main-btn:hover { 
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 242, 255, 0.5);
}

.main-btn:hover::after {
    left: 120%;
}

#registerForm .main-btn {
    background: linear-gradient(135deg, var(--secondary), #ff003c);
    box-shadow: 0 5px 20px rgba(255, 0, 85, 0.3);
}
#registerForm .main-btn:hover {
    box-shadow: 0 8px 25px rgba(255, 0, 85, 0.5);
}

.hidden { 
    display: none; 
}

/* Form Animation */
.form-content form {
    animation: fadeSlideUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}