/* עיצוב קולנועי עתידני לדף התחברות */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* רקע אנימציה - גרדיאנט זז */
.cinema-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(45deg, #000000, #1a0033, #000000, #001a33);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* פסי סרט זזים */
.film-strips {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.film-strip {
    position: absolute;
    width: 80px;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 20px,
        rgba(255, 255, 255, 0.03) 20px,
        rgba(255, 255, 255, 0.03) 25px
    );
    border-left: 2px solid rgba(255, 255, 255, 0.05);
    border-right: 2px solid rgba(255, 255, 255, 0.05);
    opacity: 0.5;
}

.film-strip::before,
.film-strip::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 18px,
        rgba(255, 255, 255, 0.1) 18px,
        rgba(255, 255, 255, 0.1) 22px
    );
}

.film-strip::before {
    left: 5px;
}

.film-strip::after {
    right: 5px;
}

.film-strip:nth-child(1) {
    left: 5%;
    animation: filmScroll 20s linear infinite;
}

.film-strip:nth-child(2) {
    left: 30%;
    animation: filmScroll 25s linear infinite reverse;
}

.film-strip:nth-child(3) {
    right: 5%;
    animation: filmScroll 18s linear infinite;
}

@keyframes filmScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

/* כוכבים/נקודות אור */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

.star:nth-child(odd) {
    animation-delay: 1s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* כרטיס ההתחברות */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-card {
    background: rgba(20, 20, 30, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 100px rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* לוגו */
.login-logo {
    text-align: center;
    margin-bottom: 40px;
    animation: glow 2s ease-in-out infinite;
}

.login-logo i {
    font-size: 5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.5));
}

.login-logo h1 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-top: 15px;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

.login-logo p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-top: 5px;
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(102, 126, 234, 0.8));
    }
}

/* שדות טופס */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
    font-size: 0.9rem;
}

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* הוספת padding לצד הנכון בהתאם לכיוון */
html[dir="rtl"] .form-control {
    padding-left: 50px;
    padding-right: 20px;
}

html[dir="ltr"] .form-control {
    padding-right: 50px;
    padding-left: 20px;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1),
                0 0 20px rgba(102, 126, 234, 0.3);
    color: white;
    outline: none;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* אייקונים בשדות */
.input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    pointer-events: none;
}

/* מיקום האייקון בהתאם לכיוון */
html[dir="rtl"] .input-icon {
    left: 20px;
    right: auto;
}

html[dir="ltr"] .input-icon {
    right: 20px;
    left: auto;
}

.form-control:focus + .input-icon {
    color: #667eea;
}

/* כפתור התחברות */
.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.btn-login:active {
    transform: translateY(0);
}

/* הודעות שגיאה */
.alert {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 12px;
    color: #ff6b6b;
    padding: 15px;
    margin-bottom: 25px;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.alert i {
    margin-left: 10px;
}

/* Checkbox זכור אותי */
.form-check {
    margin: 20px 0;
}

.form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-label {
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

/* אפקט הקלדה */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typing-cursor {
    animation: blink 1s infinite;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding: 20px 0;
    }
    
    .login-container {
        margin: 20px auto;
    }
    
    .login-card {
        padding: 40px 30px;
    }
    
    .login-logo h1 {
        font-size: 1.5rem;
    }
    
    .login-logo i {
        font-size: 4rem;
    }
    
    .film-strip {
        width: 60px;
    }
}

/* אנימציה של אור הזרקור */
.spotlight {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    animation: spotlightMove 10s ease-in-out infinite;
}

@keyframes spotlightMove {
    0%, 100% {
        top: 10%;
        left: 10%;
    }
    25% {
        top: 70%;
        left: 80%;
    }
    50% {
        top: 30%;
        left: 30%;
    }
    75% {
        top: 80%;
        left: 20%;
    }
}

/* פרטיקלים */
.particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: rgba(102, 126, 234, 0.6);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* טעינה */
.loading-spinner {
    display: none;
    margin-right: 10px;
}

.btn-login.loading .loading-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

