/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Sora:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --accent-primary: #2563eb;
    --accent-secondary: #3b82f6;
    --accent-hover: #1d4ed8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --card-bg: #ffffff;
    --input-bg: #f8f9fa;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-hover: #2563eb;
    --border-color: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
    --card-bg: #1e293b;
    --input-bg: #334155;
    --success: #22c55e;
    --warning: #fbbf24;
    --error: #f87171;
    --info: #60a5fa;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    color: var(--accent-primary);
    text-decoration: none;
}

.nav-logo i {
    font-size: 28px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
    background: var(--bg-secondary);
}

.nav-link i {
    font-size: 12px;
}

.nav-item-dropdown {
    position: relative;
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    padding: 30px;
    min-width: 900px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
}

.nav-item-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    margin-top: 0;
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.mega-column h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mega-column h3 i {
    color: var(--accent-primary);
}

.mega-column ul {
    list-style: none;
}

.mega-column ul li {
    margin-bottom: 8px;
}

.mega-column ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.mega-column ul li a:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
    transform: translateX(5px);
}

.mega-column ul li a i {
    font-size: 14px;
    width: 20px;
}

/* Popular Tools Grid in Mega Menu */
.popular-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tool-mini-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tool-mini-card:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.tool-mini-card i {
    font-size: 24px;
}

.tool-mini-card span {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

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

.theme-toggle {
    background: var(--bg-secondary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--accent-primary);
    color: white;
    transform: rotate(180deg);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    padding: 100px 20px 80px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--gradient-primary);
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(100px);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
}

.hero-content {
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    font-family: 'Sora', sans-serif;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

/* Hero Illustration */
.hero-illustration {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.illustration-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.illustration-card {
    aspect-ratio: 1;
    background: var(--card-bg);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    font-size: 48px;
    color: var(--accent-primary);
    transition: all 0.4s ease;
}

.illustration-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-xl);
}

.card-1 {
    animation: float 3s ease-in-out infinite;
}

.card-2 {
    animation: float 3s ease-in-out infinite 0.5s;
}

.card-3 {
    animation: float 3s ease-in-out infinite 1s;
}

.card-4 {
    animation: float 3s ease-in-out infinite 1.5s;
}

/* Tools Section */
.tools-section {
    padding: 80px 20px;
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    font-family: 'Sora', sans-serif;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.tool-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px 30px;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-primary);
}

.tool-card:hover::before {
    opacity: 0.05;
}

.tool-icon {
    width: 70px;
    height: 70px;
    background: var(--bg-secondary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 32px;
    color: var(--accent-primary);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.tool-card:hover .tool-icon {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.tool-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.tool-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* FAQ Section */
.faq-section {
    padding: 80px 20px;
    background: var(--bg-primary);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card-bg);
    border-radius: 16px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--accent-primary);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--accent-primary);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 25px 20px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 60px 20px 20px;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 15px;
    font-family: 'Sora', sans-serif;
}

.footer-logo i {
    font-size: 28px;
}

.footer-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
}

.footer-column h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-column ul li a:hover {
    color: var(--accent-primary);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Tool Page Styles */
.tool-page {
    min-height: calc(100vh - 70px);
    padding: 100px 20px 80px;
}

.tool-container {
    max-width: 900px;
    margin: 0 auto;
}

.tool-header {
    text-align: center;
    margin-bottom: 50px;
}

.tool-header h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    font-family: 'Sora', sans-serif;
}

.tool-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

.tool-content {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.result-container {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
    border: 2px solid var(--border-color);
}

.result-container.hidden {
    display: none;
}

.result-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 10px;
}

.result-label {
    color: var(--text-secondary);
    font-size: 16px;
}

.tool-description {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--border-color);
}

.tool-description h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.tool-description p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert i {
    font-size: 20px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Content Pages */
.content-page {
    min-height: calc(100vh - 70px);
    padding: 100px 20px 80px;
}

.content-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 50px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.content-container h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    font-family: 'Sora', sans-serif;
}

.content-container h2 {
    font-size: 28px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
}

.content-container p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.content-container ul,
.content-container ol {
    margin-left: 25px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.content-container li {
    margin-bottom: 10px;
    line-height: 1.7;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 40px auto;
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .mega-menu {
        min-width: 700px;
    }
    
    .mega-menu-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 42px;
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-primary);
        flex-direction: column;
        padding: 30px;
        transition: left 0.3s ease;
        overflow-y: auto;
        border-top: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translateY(8px);
    }
    
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-8px);
    }
    
    .mega-menu {
        position: static;
        transform: none;
        min-width: auto;
        width: 100%;
        margin-top: 10px;
        padding: 20px;
    }
    
    .mega-menu-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .nav-item-dropdown .mega-menu {
        display: none;
    }
    
    .nav-item-dropdown.active .mega-menu {
        display: block;
    }
    
    .hero {
        padding: 60px 20px 40px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 32px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .tool-content,
    .content-container {
        padding: 25px;
    }
    
    .tool-header h1,
    .content-container h1 {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .illustration-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .illustration-card {
        font-size: 32px;
    }
}
