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

:root {
    --primary: #6C63FF;
    --secondary: #FF6584;
    --accent: #00D2A0;
    --dark: #2D2D44;
    --light: #F8F9FF;
    --gradient: linear-gradient(135deg, #6C63FF, #FF6584);
    --gradient-2: linear-gradient(135deg, #667eea, #764ba2);
    --shadow: 0 10px 40px rgba(108, 99, 255, 0.15);
    --shadow-lg: 0 20px 60px rgba(108, 99, 255, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
}

a { text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.loader {
    width: 60px; height: 60px;
    border-radius: 50%;
    border: 6px solid #e0e0ff;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Navigation */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s;
}
.navbar.scrolled {
    background: rgba(255,255,255,0.97);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 10px 0;
}
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
}
.logo-icon {
    width: 40px; height: 40px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}
.logo-text { color: var(--dark); }
.highlight { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-menu {
    display: flex;
    gap: 30px;
}
.nav-menu a {
    color: var(--dark);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: 0.3s;
}
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--gradient);
    transition: 0.3s;
}
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 20px; }

.btn-glow {
    padding: 10px 25px;
    background: var(--gradient);
    color: white !important;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
    transition: 0.3s;
}
.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 99, 255, 0.4);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 5px;
}
.hamburger span {
    width: 25px; height: 3px;
    background: var(--dark);
    border-radius: 5px;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #f6f5ff 0%, #fff0f3 50%, #f0fff4 100%);
    padding: 100px 0 50px;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(108,99,255,0.08), transparent);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,101,132,0.08), transparent);
    border-radius: 50%;
}
.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.badge i { color: #FFD700; }
.hero-text h1 {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--dark);
}
.hero-text p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 30px;
    max-width: 500px;
}
.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    background: var(--gradient);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: 0.3s;
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(108, 99, 255, 0.4);
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    background: white;
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--primary);
    transition: 0.3s;
}
.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}
.hero-stats {
    display: flex;
    gap: 40px;
}
.stat-item {
    display: flex;
    flex-direction: column;
}
.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
}
.stat-label {
    font-size: 0.85rem;
    color: #888;
}
.hero-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-image img {
    max-width: 100%;
    border-radius: 20px;
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
.floating-elements {
    position: absolute;
    width: 100%; height: 100%;
    pointer-events: none;
}
.float-item {
    position: absolute;
    font-size: 2.5rem;
    font-weight: 800;
    opacity: 0.15;
    animation: floatAround 8s ease-in-out infinite;
}
.float-item.pi { top: 10%; left: 10%; color: var(--primary); animation-delay: 0s; }
.float-item.sigma { top: 20%; right: 15%; color: var(--secondary); animation-delay: 2s; }
.float-item.theta { bottom: 25%; left: 5%; color: var(--accent); animation-delay: 4s; }
.float-item.euler { bottom: 30%; right: 10%; color: #FF6B6B; animation-delay: 6s; }
@keyframes floatAround {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(5deg); }
    75% { transform: translateY(15px) rotate(-5deg); }
}
.hero-card {
    position: absolute;
    padding: 12px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    animation: float 5s ease-in-out infinite;
}
.hero-card i { color: var(--primary); }
.hero-card.card-1 { top: 10%; right: -5%; animation-delay: 0s; }
.hero-card.card-2 { bottom: 15%; left: -5%; animation-delay: 2.5s; }

.wave-divider {
    position: absolute;
    bottom: -1px;
    left: 0; width: 100%;
    line-height: 0;
}
.wave-divider svg {
    width: 100%;
    height: 80px;
    fill: white;
}

/* Section Styles */
section { padding: 100px 0; }
.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-badge {
    display: inline-block;
    padding: 6px 20px;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}
.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.section-header p {
    color: #888;
    font-size: 1.05rem;
}

/* About Section */
.about { background: white; }
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.about-image { position: relative; }
.about-img-frame {
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}
.about-img-frame::before {
    content: '';
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    background: var(--gradient);
    border-radius: 30px;
    z-index: -1;
}
.about-img-frame img {
    width: 100%;
    display: block;
    border-radius: 25px;
}
.about-experience {
    position: absolute;
    bottom: -30px; right: -30px;
    background: var(--gradient);
    color: white;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.about-experience .exp-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
}
.about-experience .exp-label {
    font-size: 0.85rem;
    opacity: 0.9;
}
.about-text { display: flex; flex-direction: column; gap: 25px; }
.about-feature {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}
.about-feature i {
    width: 50px; height: 50px;
    min-width: 50px;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.3rem;
}
.about-feature h4 { margin-bottom: 5px; }
.about-feature p { color: #888; font-size: 0.95rem; line-height: 1.6; }
.about-text .btn-primary { align-self: flex-start; }

/* Courses Section */
.courses { background: var(--light); }
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}
.course-card {
    background: white;
    border-radius: 25px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 5px 30px rgba(0,0,0,0.05);
    transition: 0.4s;
    position: relative;
    border: 2px solid transparent;
}
.course-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.course-card.popular {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}
.popular-tag {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    padding: 5px 20px;
    background: var(--gradient);
    color: white;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}
.course-icon {
    width: 70px; height: 70px;
    margin: 0 auto 20px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    transition: 0.3s;
}
.course-card:hover .course-icon {
    background: var(--gradient);
    color: white;
}
.course-class {
    display: inline-block;
    padding: 4px 15px;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}
.course-card h3 { margin-bottom: 20px; font-size: 1.2rem; }
.course-card ul { text-align: left; margin-bottom: 25px; }
.course-card ul li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}
.course-card ul li i { color: var(--accent); }
.btn-outline {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Features Section */
.features {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}
.features::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.features .section-header h2,
.features .section-header p { color: white; }
.features .section-badge { background: rgba(255,255,255,0.2); color: white; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    position: relative;
    z-index: 1;
}
.feature-box {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 35px 25px;
    border-radius: 20px;
    text-align: center;
    transition: 0.4s;
}
.feature-box:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}
.feature-icon {
    width: 70px; height: 70px;
    margin: 0 auto 20px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}
.feature-box h4 { color: white; margin-bottom: 10px; font-size: 1.15rem; }
.feature-box p { color: rgba(255,255,255,0.8); font-size: 0.9rem; line-height: 1.6; }

/* Demo Banner */
.demo-banner {
    background: white;
    padding: 80px 0;
}
.banner-content {
    background: var(--gradient);
    border-radius: 30px;
    padding: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    box-shadow: var(--shadow-lg);
}
.banner-text h2 { font-size: 2.2rem; color: white; margin-bottom: 10px; }
.banner-text p { color: rgba(255,255,255,0.9); margin-bottom: 20px; }
.banner-features { display: flex; gap: 20px; flex-wrap: wrap; }
.banner-features span {
    color: white;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.banner-features i { color: #FFD700; }
.banner-cta { text-align: center; }
.banner-cta p { color: rgba(255,255,255,0.8); margin-top: 10px; font-size: 0.9rem; }
.btn-large { padding: 18px 40px; font-size: 1.1rem; }

/* Testimonials */
.testimonials { background: var(--light); }
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.testimonial-card {
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.05);
    transition: 0.4s;
}
.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}
.testi-stars { color: #FFD700; font-size: 1.2rem; margin-bottom: 15px; }
.testimonial-card p {
    color: #666;
    line-height: 1.7;
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 20px;
}
.testi-user {
    display: flex;
    align-items: center;
    gap: 15px;
}
.testi-avatar {
    width: 50px; height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}
.testi-user h5 { font-size: 1rem; }
.testi-user span { font-size: 0.85rem; color: #888; }

/* Legacy Section */
.legacy {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.legacy::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(108,99,255,0.05), transparent 60%);
    animation: pulseBg 10s ease-in-out infinite;
}
@keyframes pulseBg {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.legacy-content { position: relative; z-index: 1; }
.legacy-icon {
    width: 80px; height: 80px;
    margin: 0 auto 20px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}
.legacy h2 { font-size: 2.5rem; color: white; margin-bottom: 10px; }
.legacy-subtitle { color: rgba(255,255,255,0.7); font-size: 1.1rem; margin-bottom: 50px; }
.legacy-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}
.legacy-stat { text-align: center; color: white; }
.legacy-stat i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.legacy-stat .stat-num {
    display: block;
    color: white;
    font-size: 1.3rem;
}
.legacy-stat span { color: rgba(255,255,255,0.7); display: block; font-size: 0.9rem; }
.legacy-stat span:last-child { color: rgba(255,255,255,0.5); }

/* Contact Section */
.contact { background: white; }
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 40px;
    background: var(--light);
    border-radius: 20px;
}
.contact-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}
.contact-item i {
    width: 45px; height: 45px;
    min-width: 45px;
    background: var(--gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.1rem;
}
.contact-item h4 { font-size: 1rem; margin-bottom: 3px; }
.contact-item p { color: #888; font-size: 0.9rem; }
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 40px;
    background: var(--light);
    border-radius: 20px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
    padding: 15px 18px;
    border: 2px solid #e0e0ff;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    background: white;
    transition: 0.3s;
    color: var(--dark);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}
.btn-submit { justify-content: center; padding: 16px; font-size: 1.05rem; }

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 80px 0 0;
}
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-about .logo-text { color: white; }
.footer-about p {
    color: rgba(255,255,255,0.6);
    margin: 20px 0;
    font-size: 0.9rem;
    line-height: 1.7;
}
.footer-social { display: flex; gap: 12px; }
.footer-social a {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: 0.3s;
}
.footer-social a:hover {
    background: var(--gradient);
    transform: translateY(-3px);
}
.footer-links h4 {
    margin-bottom: 25px;
    font-size: 1.1rem;
}
.footer-links a {
    display: block;
    color: rgba(255,255,255,0.5);
    margin-bottom: 15px;
    font-size: 0.9rem;
    transition: 0.3s;
}
.footer-links a:hover { color: white; padding-left: 5px; }
.footer-bottom {
    text-align: center;
    padding: 25px 0;
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 50px; height: 50px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 999;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    transform: translateY(-5px);
}

/* Animations on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.6s;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-text h1 { font-size: 2.5rem; }
    .about-content { gap: 40px; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px; left: -100%;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        transition: 0.4s;
        z-index: 100;
    }
    .nav-menu.active { left: 0; }
    .hamburger { display: flex; }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-text h1 { font-size: 2rem; }
    .hero-text p { margin: 0 auto 30px; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-image { display: none; }

    .about-content { grid-template-columns: 1fr; }
    .about-experience { position: relative; bottom: 0; right: 0; margin-top: 20px; }

    .features-grid { grid-template-columns: 1fr 1fr; }
    .testimonial-grid { grid-template-columns: 1fr; }
    .contact-content { grid-template-columns: 1fr; }

    .banner-content { flex-direction: column; text-align: center; padding: 40px; }
    .banner-features { justify-content: center; }

    .section-header h2 { font-size: 1.8rem; }
    .legacy-stats { flex-direction: column; gap: 30px; }
    .footer-content { grid-template-columns: 1fr; gap: 30px; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .features-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-stats { flex-wrap: wrap; gap: 20px; }
}