/* Global Reset & Variables */
:root {
    --primary-color: #0072ff;
    --primary-glow: rgba(0, 114, 255, 0.4);
    --secondary-color: #00c6ff;
    --bg-dark: #070c19;
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
    --glass-bg: rgba(7, 12, 25, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-glow-border: rgba(0, 114, 255, 0.25);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Light Theme overrides (Optional, toggled by JS) */
[data-theme="light"] {
    --primary-color: #0056c6;
    --primary-glow: rgba(0, 86, 198, 0.2);
    --secondary-color: #00a3d4;
    --bg-dark: #f0f4f8;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-glow-border: rgba(0, 86, 198, 0.15);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    transition: background-color 0.5s ease;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #070c19;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 114, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

.loading-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: #ffffff;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Background Container & Image */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
}

.bg-image {
    width: 100%;
    height: 100%;
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.02);
    transition: transform 10s ease-out, filter 0.5s ease;
}

.bg-container:hover .bg-image {
    transform: scale(1.05);
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(7, 12, 25, 0.4) 0%, rgba(7, 12, 25, 0.85) 100%);
    backdrop-filter: blur(1px);
    transition: background 0.5s ease;
}

[data-theme="light"] .bg-overlay {
    background: linear-gradient(135deg, rgba(240, 244, 248, 0.3) 0%, rgba(240, 244, 248, 0.85) 100%);
    backdrop-filter: blur(4px);
}

/* App Layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 5%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.9rem 5%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo-dot {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-glow);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-main);
}

.logo-text span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link i {
    font-size: 1rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .nav-link:hover, [data-theme="light"] .nav-link.active {
    background: rgba(0, 0, 0, 0.05);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0053ba 100%);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: var(--transition);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 114, 255, 0.6);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 75px;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    z-index: 99;
    transform: translateY(-150%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.mobile-link:hover, .mobile-link.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.btn-login-mobile {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0053ba 100%);
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Main Content Layout */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
}

/* Hero Section */
.hero-section {
    min-height: calc(100vh - 150px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 5%;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    padding: 40px;
    border-radius: 24px;
    background: rgba(7, 12, 25, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .hero-content {
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 30%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-title {
    background: linear-gradient(135deg, #070c19 30%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0053ba 100%);
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px var(--primary-glow);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 114, 255, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 14px 32px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

[data-theme="light"] .btn-secondary {
    background: rgba(0, 0, 0, 0.03);
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Services Section */
.services-section {
    padding: 5rem 5% 7rem;
    background: linear-gradient(to bottom, transparent, rgba(7, 12, 25, 0.5));
    transition: opacity 0.5s ease;
}

.services-section.hidden {
    display: none;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Service Card with Neon Glow Effect */
.service-card {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 35px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.03));
    z-index: 1;
    pointer-events: none;
}

.card-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: -50px;
    right: -50px;
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--glass-glow-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 1px 1px var(--primary-glow);
}

.service-card:hover .card-glow {
    opacity: 1;
    transform: scale(2);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(0, 114, 255, 0.1);
    border: 1px solid rgba(0, 114, 255, 0.2);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 25px;
    transition: var(--transition);
}

.service-card:hover .card-icon {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: rotate(5deg);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.card-link i {
    transition: var(--transition);
}

.card-link:hover {
    color: var(--secondary-color);
}

.card-link:hover i {
    transform: translateX(5px);
}

/* Footer styling */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 5%;
    background: rgba(7, 12, 25, 0.8);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--text-main);
}

.footer-separator {
    opacity: 0.3;
}

/* Login Modal with Glassmorphic design */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 12, 25, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: rgba(10, 20, 40, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 1px 1px var(--primary-glow);
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.open .modal-card {
    transform: scale(1);
}

[data-theme="light"] .modal-card {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 114, 255, 0.1);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    margin: 0 auto 15px;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition);
}

[data-theme="light"] .form-group input {
    background: rgba(0, 0, 0, 0.02);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
    background: rgba(255, 255, 255, 0.06);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-muted);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0053ba 100%);
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: var(--transition);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 114, 255, 0.6);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .navbar {
        padding: 1rem 5%;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    
    .hero-cta button, .hero-cta a {
        width: 100%;
        justify-content: center;
    }
    
    .footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-right {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modal-card {
        padding: 30px 20px;
    }
    
    .hero-content {
        padding: 25px 15px;
    }
}
