:root {
    --neon-blue: #00aaff;
    --neon-pink: #ff2d78;
    --deep-dark: #050810;
    --card-bg: rgba(6, 15, 35, 0.85);
    --input-bg: rgba(0, 20, 60, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--deep-dark);
    min-height: 100vh;
    overflow: hidden;
    direction: rtl;
}

/* ===== ANIMATED BACKGROUND ===== */
.bg-scene {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(0, 60, 150, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(180, 0, 80, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(0, 30, 100, 0.2) 0%, transparent 50%),
        linear-gradient(180deg, #020510 0%, #060b1a 50%, #030810 100%);
    z-index: 0;
}

/* Grid lines */
.grid-overlay {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 150, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 150, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 60px 60px;
    }
}

/* ===== HEADLAMP EFFECTS ===== */
.headlamp {
    position: fixed;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
}

.headlamp-left {
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    background: radial-gradient(circle at 70% 50%,
            rgba(0, 180, 255, 0.25) 0%,
            rgba(0, 120, 255, 0.12) 30%,
            rgba(0, 60, 200, 0.05) 60%,
            transparent 80%);
    animation: headlampPulse 4s ease-in-out infinite alternate;
}

.headlamp-right {
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    background: radial-gradient(circle at 30% 50%,
            rgba(255, 30, 120, 0.2) 0%,
            rgba(200, 0, 80, 0.1) 30%,
            rgba(150, 0, 60, 0.04) 60%,
            transparent 80%);
    animation: headlampPulse 4s ease-in-out infinite alternate-reverse;
}

/* Light beams */
.beam {
    position: fixed;
    top: 0;
    height: 100vh;
    width: 300px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.06;
    animation: beamFlicker 6s ease-in-out infinite;
}

.beam-left {
    left: 0;
    background: linear-gradient(90deg, rgba(0, 150, 255, 0.8), transparent);
    clip-path: polygon(0 45%, 100% 30%, 100% 70%, 0 55%);
}

.beam-right {
    right: 0;
    background: linear-gradient(270deg, rgba(255, 30, 100, 0.8), transparent);
    clip-path: polygon(0 30%, 100% 45%, 100% 55%, 0 70%);
}

@keyframes beamFlicker {

    0%,
    100% {
        opacity: 0.06;
    }

    50% {
        opacity: 0.12;
    }
}

@keyframes headlampPulse {
    0% {
        opacity: 0.7;
        transform: translateY(-50%) scale(1);
    }

    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1.1);
    }
}

/* ===== PARTICLES ===== */
.particles {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-20px) translateX(30px);
        opacity: 0;
    }
}

/* ===== MAIN WRAPPER ===== */
.scene-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===== BMW BG WATERMARK ===== */
.bmw-bg {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    object-fit: cover;
    opacity: 0.04;
    z-index: 3;
    filter: blur(2px) saturate(0.5);
    animation: bmwDrift 15s ease-in-out infinite alternate;
}

@keyframes bmwDrift {
    0% {
        opacity: 0.03;
        transform: translateX(-50%) scale(1);
    }

    100% {
        opacity: 0.06;
        transform: translateX(-50%) scale(1.05);
    }
}

/* ===== LOGIN CARD ===== */
.login-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: linear-gradient(135deg, rgba(5, 18, 50, 0.92) 0%, rgba(8, 20, 55, 0.88) 50%, rgba(5, 15, 40, 0.95) 100%);
    backdrop-filter: blur(30px) saturate(1.5);
    -webkit-backdrop-filter: blur(30px) saturate(1.5);
    border-radius: 24px;
    border: 1px solid rgba(0, 150, 255, 0.2);
    box-shadow:
        0 0 0 1px rgba(255, 45, 120, 0.08),
        0 0 60px rgba(0, 100, 255, 0.15),
        0 0 120px rgba(0, 60, 200, 0.1),
        0 40px 80px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: cardEntrance 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    overflow: hidden;
}

/* Shimmer border */
.login-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 25px;
    background: linear-gradient(135deg,
            rgba(0, 170, 255, 0.4) 0%,
            rgba(255, 45, 120, 0.3) 25%,
            rgba(0, 80, 200, 0.1) 50%,
            rgba(255, 45, 120, 0.3) 75%,
            rgba(0, 170, 255, 0.4) 100%);
    background-size: 300% 300%;
    animation: borderShimmer 4s linear infinite;
    z-index: -1;
    border-radius: 25px;
}

@keyframes borderShimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Top accent line */
.card-top-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), var(--neon-pink), var(--neon-blue), transparent);
    background-size: 200% 100%;
    animation: accentSlide 3s linear infinite;
}

@keyframes accentSlide {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== LOGO ===== */
.logo-container {
    position: relative;
    display: flex;
    justify-content: center;
    animation: logoEntrance 1s 0.3s both;
}

.logo-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    filter: drop-shadow(0 0 20px rgba(0, 150, 255, 0.5)) drop-shadow(0 0 40px rgba(255, 45, 120, 0.3));
    animation: logoFloat 5s ease-in-out infinite, logoGlow 3s ease-in-out infinite alternate;
    position: relative;
    z-index: 2;
}

.logo-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    animation: ringRotate 4s linear infinite;
}

.logo-ring-2 {
    position: absolute;
    inset: -16px;
    border-radius: 50%;
    border: 1px solid rgba(0, 170, 255, 0.2);
    animation: ringRotate 8s linear infinite reverse;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 15px rgba(0, 150, 255, 0.4)) drop-shadow(0 0 30px rgba(255, 45, 120, 0.2));
    }

    100% {
        filter: drop-shadow(0 0 30px rgba(0, 150, 255, 0.7)) drop-shadow(0 0 60px rgba(255, 45, 120, 0.4));
    }
}

@keyframes ringRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

/* ===== HEADINGS ===== */
.title-main {
    font-family: 'Tajawal', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, rgba(0, 200, 255, 0.9) 40%, rgba(255, 80, 150, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: -0.5px;
    animation: fadeSlideUp 0.8s 0.5s both;
}

.title-sub {
    color: rgba(150, 200, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 400;
    text-align: center;
    letter-spacing: 0.3px;
    animation: fadeSlideUp 0.8s 0.7s both;
}

@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== INPUTS ===== */
.input-group {
    position: relative;
    animation: fadeSlideUp 0.8s both;
}

.input-group:nth-child(1) {
    animation-delay: 0.8s;
}

.input-group:nth-child(2) {
    animation-delay: 0.95s;
}

.input-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(100, 180, 255, 0.8);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-field {
    width: 100%;
    padding: 14px 48px 14px 44px;
    background: rgba(0, 20, 70, 0.6);
    border: 1px solid rgba(0, 100, 255, 0.2);
    border-radius: 12px;
    color: #e8f4ff;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    outline: none;
    transition: all 0.3s ease;
    direction: rtl;
    letter-spacing: 0.2px;
}

.input-field::placeholder {
    color: rgba(100, 150, 220, 0.4);
    font-size: 0.9rem;
}

.input-field:focus {
    border-color: rgba(0, 170, 255, 0.6);
    background: rgba(0, 30, 90, 0.7);
    box-shadow:
        0 0 0 3px rgba(0, 150, 255, 0.12),
        0 0 20px rgba(0, 100, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.input-icon {
    position: absolute;
    right: 14px;
    color: rgba(0, 170, 255, 0.6);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.3s;
}

.input-field:focus~.input-icon {
    color: rgba(0, 200, 255, 0.9);
}

.eye-toggle {
    position: absolute;
    left: 14px;
    color: rgba(0, 170, 255, 0.5);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s;
    user-select: none;
}

.eye-toggle:hover {
    color: rgba(0, 200, 255, 0.9);
}

/* ===== LOGIN BUTTON ===== */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0066dd 0%, #0099ff 50%, #0077ee 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 14px;
    color: white;
    font-family: 'Tajawal', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow:
        0 0 25px rgba(0, 120, 255, 0.4),
        0 8px 30px rgba(0, 0, 0, 0.3);
    animation: fadeSlideUp 0.8s 1.1s both;
    letter-spacing: 0.5px;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(-20deg);
    animation: btnShine 3s ease-in-out infinite;
}

@keyframes btnShine {
    0% {
        left: -60%;
    }

    100% {
        left: 120%;
    }
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 40px rgba(0, 140, 255, 0.6),
        0 12px 40px rgba(0, 0, 0, 0.4);
    background-position: right center;
}

.btn-login:active {
    transform: translateY(0px) scale(0.98);
}

/* Login animation state */
.btn-login.loading {
    pointer-events: none;
    background: linear-gradient(135deg, #004499, #0066cc);
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ===== FORGOT LINK ===== */
.forgot-link {
    color: rgba(100, 170, 255, 0.6);
    font-size: 0.85rem;
    text-decoration: none;
    text-align: center;
    display: block;
    transition: color 0.3s;
    animation: fadeSlideUp 0.8s 1.25s both;
}

.forgot-link:hover {
    color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.4);
}

/* ===== DIVIDER ===== */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 150, 255, 0.2), rgba(255, 45, 120, 0.2), transparent);
    animation: fadeSlideUp 0.8s 1s both;
}

/* ===== SUCCESS OVERLAY ===== */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 10, 30, 0.95);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.success-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.success-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #003399, #0066ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 0 60px rgba(0, 100, 255, 0.5), 0 0 120px rgba(0, 60, 200, 0.3);
    animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 20px;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-text {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    text-shadow: 0 0 20px rgba(0, 150, 255, 0.5);
}

/* ===== SCAN LINE ===== */
.scan-line {
    position: fixed;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 150, 255, 0.3), transparent);
    animation: scanDown 8s linear infinite;
    z-index: 5;
    pointer-events: none;
}

@keyframes scanDown {
    0% {
        top: -2px;
    }

    100% {
        top: 100vh;
    }
}

/* ===== CORNER ACCENTS ===== */
.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.corner-tl {
    top: 12px;
    right: 12px;
    border-top: 2px solid var(--neon-blue);
    border-right: 2px solid var(--neon-blue);
    border-radius: 0 4px 0 0;
}

.corner-tr {
    top: 12px;
    left: 12px;
    border-top: 2px solid var(--neon-pink);
    border-left: 2px solid var(--neon-pink);
    border-radius: 4px 0 0 0;
}

.corner-bl {
    bottom: 12px;
    right: 12px;
    border-bottom: 2px solid var(--neon-pink);
    border-right: 2px solid var(--neon-pink);
    border-radius: 0 0 4px 0;
}

.corner-br {
    bottom: 12px;
    left: 12px;
    border-bottom: 2px solid var(--neon-blue);
    border-left: 2px solid var(--neon-blue);
    border-radius: 0 0 0 4px;
}

/* ============================================
   إضافات CSS لـ adminlogin.php
   أضف هذه الأنماط إلى ملف css/adminlogin.css
   ============================================ */

/* Error Toast */
.error-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, rgba(255, 40, 80, 0.95), rgba(180, 0, 40, 0.95));
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 32px rgba(255, 40, 80, 0.4), 0 0 0 1px rgba(255, 80, 100, 0.3);
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.error-toast.active {
    transform: translateX(-50%) translateY(0);
}

/* PHP Notices */
.php-notice {
    padding: 10px 16px;
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.88rem;
    margin-bottom: 16px;
    text-align: center;
}

.php-notice--info {
    background: rgba(0, 200, 100, 0.12);
    border: 1px solid rgba(0, 200, 100, 0.3);
    color: rgba(0, 220, 120, 0.9);
}

.php-notice--warn {
    background: rgba(255, 180, 0, 0.1);
    border: 1px solid rgba(255, 180, 0, 0.3);
    color: rgba(255, 200, 50, 0.9);
}

/* Card shake animation on wrong password */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-8px);
    }

    30% {
        transform: translateX(8px);
    }

    45% {
        transform: translateX(-6px);
    }

    60% {
        transform: translateX(6px);
    }

    75% {
        transform: translateX(-3px);
    }

    90% {
        transform: translateX(3px);
    }
}

.login-card.shake {
    animation: shake 0.5s ease-in-out;
}