/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #fff;
    background: #1d1c0a;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body[data-theme="light"] {
    background: #f5f5f5;
    color: #333;
}

/* Star Background */
#star-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 20, 34, 0.7), rgba(25, 30, 44, 0.9));
    z-index: -2;
    animation: gentleFlow 15s infinite linear;
}

@keyframes gentleFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header.sticky {
    background: rgba(10, 15, 29, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo {
    width: 150px;
    height: 70px;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #FFC107;
}

.dropdown {
    position: relative;
}

.dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    color: #fff;
    padding: 0;
    transition: color 0.3s ease;
}

.dropdown .dropdown-toggle:hover {
    color: #FFC107;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background: rgba(10, 15, 29, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    min-width: 180px;
    z-index: 1001;
    top: 100%;
    right: 0;
    padding: 0.5rem 0;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0s ease 0.3s;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    display: block;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.dropdown-menu li {
    list-style: none;
    padding: 0.5rem 1rem;
}

.dropdown-menu a {
    color: #fff;
    text-decoration: none;
    display: block;
}

.dropdown-menu a:hover {
    color: #03A9F4;
}

.controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-control {
    padding: 0.7rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #9C27B0;
    border-radius: 25px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
}

.btn-control:hover {
    background: #9C27B0;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.4);
}

.btn-control i {
    margin-left: 0.5rem;
}

/* Main Content */
.main-content {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    background: transparent;
    flex: 1;
    padding-top: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Auth Section */
.auth-section {
    width: 100%;
    padding: 2rem 0;
}

.auth-card {
    background: rgba(10, 15, 29, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid rgba(156, 39, 176, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-title {
    font-size: 2.5rem;
    color: #9C27B0;
    margin-bottom: 1rem;
    font-weight: 700;
}

.auth-subtitle {
    color: #ccc;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Alert Messages */
.alert-messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #f44336;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

.alert-info {
    background: rgba(3, 169, 244, 0.1);
    border: 1px solid #03A9F4;
    color: #03A9F4;
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #FFC107;
    font-size: 1rem;
}

.form-input {
    padding: 1rem;
    border: 1px solid #9C27B0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #FFC107;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.form-input::placeholder {
    color: #aaa;
}

.form-error {
    color: #f44336;
    font-size: 0.9rem;
    min-height: 1.2rem;
    margin-top: 0.25rem;
}

/* Password Input Container */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container .form-input {
    width: 100%;
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    left: 1rem;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #FFC107;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: #ccc;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #9C27B0;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #9C27B0;
    border-color: #9C27B0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: #fff;
    font-size: 0.8rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-password {
    color: #03A9F4;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #FFC107;
    text-decoration: underline;
}

/* Auth Button */
.btn-auth-primary {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-auth-primary:hover {
    background: linear-gradient(135deg, #FFC107, #FFA000);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
}

.btn-auth-primary:active {
    transform: translateY(0);
}

/* Auth Footer */
.auth-footer {
    margin-top: 2rem;
    text-align: center;
}

.auth-divider {
    position: relative;
    margin: 1.5rem 0;
    text-align: center;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.auth-divider span {
    background: rgba(10, 15, 29, 0.95);
    padding: 0 1rem;
    color: #ccc;
    font-size: 0.9rem;
}

.auth-link {
    color: #ccc;
    margin-top: 1.5rem;
}

.link {
    color: #FFC107;
    text-decoration: none;
    transition: color 0.3s ease;
}

.link:hover {
    color: #03A9F4;
    text-decoration: underline;
}

/* Social Login */
.social-login {
    margin-bottom: 1.5rem;
}

.social-login p {
    color: #ccc;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.social-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-social {
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
    max-width: 150px;
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-google:hover {
    background: #DB4437;
    border-color: #DB4437;
}

.btn-facebook:hover {
    background: #4267B2;
    border-color: #4267B2;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, rgba(10, 15, 29, 0.9), rgba(25, 30, 44, 0.7));
    color: #fff;
    text-align: center;
    padding: 2rem 0 0 0;
    position: relative;
    width: 100%;
    margin-top: auto;
    box-shadow: inset 0 -2px 10px rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(156, 39, 176, 0.2);
    z-index: 10;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 2rem 2rem 2rem;
    text-align: right;
}

.footer-section {
    padding: 1rem;
}

.footer-section h3 {
    font-size: 1.3rem;
    color: #9C27B0;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background: #9C27B0;
}

/* Logo and Social Media Section */
.logo-social-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-logo img {
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
    width: 150px;
    height: auto;
}

.footer-logo:hover img {
    filter: brightness(0.8) invert(0.9);
}

/* Social Media Buttons */
.example-2 {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.example-2 .icon-content {
    margin: 0 5px;
    position: relative;
}

.example-2 .icon-content .tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    padding: 6px 10px;
    border-radius: 15px;
    opacity: 0;
    visibility: hidden;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.example-2 .icon-content:hover .tooltip {
    opacity: 1;
    visibility: visible;
    top: -50px;
}

.example-2 .icon-content a {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 20%;
    color: #4d4d4d;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
}

.example-2 .icon-content a:hover {
    box-shadow: 3px 2px 45px 0px rgb(0 0 0 / 50%);
}

.example-2 .icon-content a i,
.example-2 .icon-content a .x-icon {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.example-2 .icon-content a:hover {
    color: white;
}

.example-2 .icon-content a .filled {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: #000;
    transition: all 0.3s ease-in-out;
}

.example-2 .icon-content a:hover .filled {
    height: 100%;
}

.example-2 .icon-content a[data-social="x"] .filled,
.example-2 .icon-content a[data-social="x"] ~ .tooltip {
    background-color: #000000;
}

.example-2 .icon-content a[data-social="x"]:hover .filled {
    background-color: #000000;
}

.example-2 .icon-content a[data-social="x"]:hover .x-icon {
    color: #ffffff;
}

.example-2 .icon-content a[data-social="x"]:hover {
    background-color: #000000;
}

.example-2 .icon-content a[data-social="x"] {
    background-color: #ffffff;
}

.example-2 .icon-content a[data-social="x"] .x-icon {
    color: #000000;
    transition: color 0.3s ease-in-out;
}

.example-2 .icon-content a[data-social="x"]:hover ~ .tooltip {
    background-color: #000000;
    color: #ffffff;
}

.example-2 .icon-content a[data-social="instagram"] .filled,
.example-2 .icon-content a[data-social="instagram"] ~ .tooltip {
    background-color: #E4405F;
}

.example-2 .icon-content a[data-social="youtube"] .filled,
.example-2 .icon-content a[data-social="youtube"] ~ .tooltip {
    background-color: #CD201F;
}

.example-2 .icon-content a[data-social="snapchat"] .filled,
.example-2 .icon-content a[data-social="snapchat"] ~ .tooltip {
    background-color: #FFFC00;
}

/* Programmers Section */
.programmers-section {
    margin-top: 1rem;
}

.programmers-section h4 {
    font-size: 1.2rem;
    color: #9C27B0;
    margin-bottom: 1rem;
}

.programmers-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.programmer-link {
    color: #FFC107;
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.programmer-link:hover {
    color: #03A9F4;
}

/* Map Section */
.map-section iframe {
    width: 100%;
    height: 200px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Contact Information Section */
.contact-info p {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info i {
    color: #9C27B0;
}

/* Contact Form Section */
.contact-form-section .contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.8rem;
    border: 1px solid #9C27B0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #FFC107;
    background: rgba(255, 255, 255, 0.15);
}

.contact-form textarea {
    resize: vertical;
    min-height: 80px;
}

.contact-form .submit-btn {
    padding: 0.8rem;
    background: #9C27B0;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form .submit-btn:hover {
    background: #FFC107;
    transform: translateY(-2px);
}

/* Footer Copyright */
.footer-copyright {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    font-size: 0.9rem;
    color: #ccc;
}

/* Light Theme Styles */
body[data-theme="light"] .auth-card,
body[data-theme="light"] .footer {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-color: rgba(156, 39, 176, 0.2);
}

body[data-theme="light"] .form-input {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    border-color: #9C27B0;
}

body[data-theme="light"] .form-input:focus {
    background: rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .nav a,
body[data-theme="light"] .dropdown-toggle,
body[data-theme="light"] .btn-control {
    color: #333;
}

body[data-theme="light"] .footer-links a,
body[data-theme="light"] .auth-subtitle,
body[data-theme="light"] .auth-link,
body[data-theme="light"] .social-login p,
body[data-theme="light"] .checkbox-label,
body[data-theme="light"] .contact-info p,
body[data-theme="light"] .programmer-link {
    color: #666;
}

body[data-theme="light"] .overlay {
    background: linear-gradient(135deg, rgba(245, 245, 245, 0.7), rgba(225, 225, 225, 0.9));
}

body[data-theme="light"] .alert-error {
    background: rgba(244, 67, 54, 0.1);
    color: #d32f2f;
}

body[data-theme="light"] .alert-success {
    background: rgba(76, 175, 80, 0.1);
    color: #388e3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1rem 5%;
        flex-wrap: wrap;
    }

    .nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 15, 29, 0.95);
        backdrop-filter: blur(10px);
        padding: 1rem;
    }

    .nav ul.active {
        display: flex;
    }

    .dropdown-menu {
        position: static;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: none;
        border-radius: 5px;
        margin-top: 0.5rem;
    }

    .controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .auth-card {
        padding: 2rem;
        margin: 1rem;
    }

    .auth-title {
        font-size: 2rem;
    }

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .social-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-social {
        max-width: 200px;
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h3::after {
        right: 50%;
        transform: translateX(50%);
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
    }

    .auth-title {
        font-size: 1.8rem;
    }

    .form-input {
        padding: 0.8rem;
    }

    .btn-auth-primary {
        padding: 0.8rem 1.5rem;
    }

    .password-toggle {
        left: 0.5rem;
    }
}