/* ===== Login Page Styles ===== */
/* Matches Homepage Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* ===== Background ===== */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

body.dark-theme .video-background {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-theme .video-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* ===== Navigation Bar (Same as Homepage) ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

body.dark-theme .navbar {
    background: rgba(30, 30, 30, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-left {
    justify-content: flex-start;
}

.nav-center {
    justify-content: center;
    display: flex;
}

.nav-right {
    justify-content: flex-end;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
    padding: 8px 15px;
}

body.dark-theme .nav-link {
    color: #fff;
}

.nav-link:hover {
    color: #007bff;
}

.main-page-link {
    font-size: 20px !important;
    font-weight: 700 !important;
    padding: 10px 20px !important;
}

/* Language Toggle */
.language-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.globe-icon {
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
    border-radius: 50%;
    background-color: white;
    transition: all 0.3s ease;
}

body.dark-theme .globe-icon {
    background-color: #444;
    border-color: #666;
}

.globe-icon:hover {
    background-color: #007bff;
    border-color: #007bff;
    transform: scale(1.1);
}

.language-menu {
    position: absolute;
    top: 50px;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    min-width: 120px;
    z-index: 1001;
}

body.dark-theme .language-menu {
    background: #333;
    border-color: #555;
}

.language-menu.show {
    display: flex;
}

.language-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.language-option:hover {
    background: #f0f0f0;
}

body.dark-theme .language-option:hover {
    background: #444;
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    font-size: 20px;
    border: none;
    border-radius: 50%;
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-theme .theme-toggle {
    background: #444;
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
    background: #007bff;
}

/* ===== Login Container ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 40px 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 50px 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.6s ease-out;
}

body.dark-theme .login-box {
    background: rgba(30, 30, 30, 0.95);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Login Header ===== */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

body.dark-theme .login-header h1 {
    color: #fff;
}

.login-header p {
    font-size: 16px;
    color: #666;
}

body.dark-theme .login-header p {
    color: #aaa;
}

/* ===== Form Styles ===== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

body.dark-theme .form-group label {
    color: #fff;
}

.form-input {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

body.dark-theme .form-input {
    background: #444;
    border-color: #666;
    color: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-input::placeholder {
    color: #999;
}

/* Password Container */
.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 20px;
    user-select: none;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

body.dark-theme .remember-me {
    color: #aaa;
}

.checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.forgot-password {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Messages */
.message-panel {
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    display: none;
}

.message-panel.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message-panel.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

body.dark-theme .message-panel.success-message {
    background: #1e4620;
    color: #9fffb0;
    border-color: #2d6a30;
}

body.dark-theme .message-panel.error-message {
    background: #5a1a1a;
    color: #ff9999;
    border-color: #7a2a2a;
}

.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
}

/* Login Button */
.login-button {
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.login-button:active {
    transform: translateY(0);
}

body.dark-theme .login-button {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #999;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

body.dark-theme .divider::before,
body.dark-theme .divider::after {
    border-color: #555;
}

.divider span {
    padding: 0 15px;
    font-size: 14px;
    font-weight: 600;
}

/* Sign Up Link */
.signup-link {
    text-align: center;
    font-size: 14px;
    color: #666;
}

body.dark-theme .signup-link {
    color: #aaa;
}

.signup-link-text {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    transition: color 0.3s ease;
}

.signup-link-text:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* ===== Floating Message Icon (Same as Homepage) ===== */
.floating-message-icon {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    text-decoration: none;
}

.floating-message-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.6);
}

body.dark-theme .floating-message-icon {
    background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
}

.message-icon-wrapper {
    position: relative;
    width: 45px;
    height: 45px;
}

.message-svg {
    width: 100%;
    height: 100%;
    color: white;
}

.message-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
    animation: bounce 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(0, 123, 255, 0.6);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .nav-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 15px;
    }

    .nav-left,
    .nav-right {
        justify-content: center;
    }

    .nav-center {
        order: -1;
    }

    .login-box {
        padding: 40px 30px;
    }

    .login-header h1 {
        font-size: 28px;
    }

    .floating-message-icon {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }

    .message-icon-wrapper {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .login-header p {
        font-size: 14px;
    }
}

/* ===== Hide Arabic text by default ===== */
.arabic-text {
    display: none;
}

.english-text {
    display: inline;
}
