/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --text-dark: #111827;
    --text-light: #6b7280;
    --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-section: rgba(255, 255, 255, 0.95);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --primary-color: #818cf8;
    --secondary-color: #a78bfa;
    --accent-color: #fbbf24;
    --dark-color: #f9fafb;
    --light-color: #111827;
    --text-dark: #f9fafb;
    --text-light: #d1d5db;
    --bg-primary: linear-gradient(135deg, #1f2937 0%, #111827 50%, #0f172a 100%);
    --bg-card: rgba(31, 41, 55, 0.95);
    --bg-section: rgba(31, 41, 55, 0.95);
    --gradient-primary: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #f472b6 100%);
    --gradient-secondary: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: var(--transition-slow);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Header Styles */
.header {
    padding: 2rem 1rem;
    text-align: center;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 0 0 50px 50px;
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Theme Toggle Styles */
.theme-toggle {
    position: relative;
}

.theme-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    box-shadow: var(--shadow-medium);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.theme-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-heavy);
}

.theme-icon {
    position: relative;
    font-size: 1.5rem;
    width: 24px;
    height: 24px;
}

.sun-icon, .moon-icon {
    position: absolute;
    top: 0;
    left: 0;
    transition: var(--transition);
}

.sun-icon {
    color: #f59e0b;
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.moon-icon {
    color: #818cf8;
    opacity: 0;
    transform: scale(0.8) rotate(-30deg);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: scale(0.8) rotate(30deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Particles Animation */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: floatParticle 6s infinite ease-in-out;
    opacity: 0.6;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 1s;
    animation-duration: 6s;
}

.particle:nth-child(3) {
    left: 35%;
    animation-delay: 2s;
    animation-duration: 7s;
}

.particle:nth-child(4) {
    left: 50%;
    animation-delay: 0.5s;
    animation-duration: 9s;
}

.particle:nth-child(5) {
    left: 70%;
    animation-delay: 1.5s;
    animation-duration: 5s;
}

.particle:nth-child(6) {
    left: 85%;
    animation-delay: 3s;
    animation-duration: 8s;
}

.logo-section .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo i {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s infinite;
}

.logo h1 {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tagline {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* Hero Section */
.hero {
    padding: 4rem 1rem;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: var(--bg-card);
    padding: 4rem;
    border-radius: 30px;
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(20px);
    transition: var(--transition-slow);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.feature-item:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.feature-item span {
    font-weight: 500;
    color: var(--text-dark);
}

/* Download Section */
.download-section {
    text-align: center;
}

.download-btn, .cta-download-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    text-decoration: none;
}

.download-btn:hover, .cta-download-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.btn-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: 50px;
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.download-btn:hover .btn-glow {
    opacity: 0.7;
    animation: pulse-glow 1.5s infinite;
}

.download-info {
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.math-animation {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.central-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: var(--primary-color);
    z-index: 2;
    animation: pulse 2s infinite;
}

.floating-numbers {
    position: absolute;
    width: 100%;
    height: 100%;
}

.number {
    position: absolute;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    animation: float 3s ease-in-out infinite;
}

.number:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.number:nth-child(2) { top: 20%; right: 10%; animation-delay: 0.5s; }
.number:nth-child(3) { bottom: 30%; left: 10%; animation-delay: 1s; }
.number:nth-child(4) { bottom: 20%; right: 20%; animation-delay: 1.5s; }
.number:nth-child(5) { top: 50%; left: 5%; animation-delay: 2s; }
.number:nth-child(6) { top: 40%; right: 5%; animation-delay: 2.5s; }

/* AdSense Container */
.ad-container {
    margin: 3rem 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

/* Features Section */
.features-section {
    padding: 4rem 1rem;
    background: var(--bg-section);
    margin: 2rem 1rem;
    border-radius: 30px;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-slow);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-heavy);
}

.feature-card:hover::before {
    left: 100%;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    animation: wiggle 0.5s ease-in-out;
    transform: scale(1.1);
}

.feature-card h4 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Screenshots Section */
.screenshots-section {
    padding: 4rem 1rem;
    background: var(--bg-section);
    margin: 2rem 1rem;
    border-radius: 30px;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-slow);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.screenshot-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.screenshot-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.screenshot-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.screenshot-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Stats Section */
.stats-section {
    padding: 4rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    margin: 2rem 1rem;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* CTA Section */
.cta-section {
    padding: 4rem 1rem;
    background: var(--bg-section);
    margin: 2rem 1rem;
    border-radius: 30px;
    box-shadow: var(--shadow-medium);
    text-align: center;
    transition: var(--transition-slow);
}

.cta-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.system-requirements {
    margin-top: 2rem;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(99, 102, 241, 0.1);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.system-requirements p {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.system-requirements ul {
    list-style: none;
}

.system-requirements li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.system-requirements li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Footer */
.footer {
    background: rgba(31, 41, 55, 0.95);
    color: white;
    padding: 3rem 1rem 1rem;
    margin: 2rem 1rem 0;
    border-radius: 30px 30px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    padding: 0.25rem 0;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: var(--transition);
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Advanced Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCursor {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--primary-color);
    }
}

@keyframes animatedGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(100px) rotate(0deg);
        opacity: 0;
    }
    10%, 90% {
        opacity: 0.6;
    }
    50% {
        transform: translateY(-100px) rotate(180deg);
        opacity: 0.8;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px var(--primary-color);
    }
    to {
        box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes wiggle {
    0%, 7% {
        transform: rotateZ(0);
    }
    15% {
        transform: rotateZ(-15deg);
    }
    20% {
        transform: rotateZ(10deg);
    }
    25% {
        transform: rotateZ(-10deg);
    }
    30% {
        transform: rotateZ(6deg);
    }
    35% {
        transform: rotateZ(-4deg);
    }
    40%, 100% {
        transform: rotateZ(0);
    }
}

/* Animation Classes */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    margin: 0 auto;
    animation: 
        typewriter 2s steps(8) 1s 1 normal both,
        blinkCursor 1s steps(2) infinite;
}

.animated-gradient {
    background: linear-gradient(-45deg, #6366f1, #8b5cf6, #ec4899, #f59e0b);
    background-size: 400% 400%;
    animation: animatedGradient 3s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.bounce-in {
    animation: bounceIn 1s ease-out 0.5s both;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-up.delay-1 {
    animation-delay: 0.3s;
}

.fade-in-up.delay-2 {
    animation-delay: 0.6s;
}

.wiggle-hover:hover {
    animation: wiggle 0.5s ease-in-out;
}

.glow-hover:hover {
    animation: glow 0.5s ease-in-out alternate infinite;
}

/* Ripple Effect */
.ripple-btn {
    position: relative;
    overflow: hidden;
}

.ripple-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple-btn:active::before {
    width: 300px;
    height: 300px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .theme-toggle {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshots-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .section-header h3 {
        font-size: 2rem;
    }
    
    .cta-content h3 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .download-btn, .cta-download-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}