:root {
    --primary: #6c5ce7;
    --primary-dark: #5649c0;
    --secondary: #00cec9;
    --accent: #fd79a8;
    --dark: #0f0e17;
    --light: #fffffe;
    --gray: #a7a9be;
    --dark-gray: #2e2f3e;
    --light-gray: #f1f1f1;
    --card-bg-light: #ffffff;
    --card-bg-dark: #16161a;
    --header-bg-light: rgba(255,255,255,0.98);
    --header-bg-dark: rgba(15,14,23,0.98);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --section-padding: 4rem 1.5rem;
}

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

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

body.dark {
    background-color: var(--dark);
    color: var(--light);
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--header-bg-light);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

body.dark header {
    background-color: var(--header-bg-dark);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--primary);
    text-decoration: none;
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    font-size: 1.05rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.8rem;
    background-color: var(--primary);
    color: white;
    border-radius: 0.6rem;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

/* Modern Hamburger Menu */
.hamburger {
    display: none;
    width: 30px;
    height: 24px;
    position: relative;
    transform: rotate(0deg);
    transition: .5s ease-in-out;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 2000;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.hamburger span:nth-child(1) {
    top: 0px;
    background: #27c93f;
}

.hamburger span:nth-child(2) {
    top: 10px;
    background: var(--primary);
    left: 8px;
}

.hamburger span:nth-child(3) {
    top: 20px;
    background: #ff4757;
}

.hamburger.open span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    left: -30px;
}

.hamburger.open span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 1.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.8rem;
    line-height: 1.2;
    font-weight: 700;
}

.hero-text h1 span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.hero-text h1 span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    
    z-index: -1;
    border-radius: 4px;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: var(--gray);
    max-width: 90%;
    line-height: 1.7;
}

body.dark .hero-text p {
    color: var(--light-gray);
}

.hero-buttons {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.hero-code-container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-code {
    position: relative;
    background-color: var(--dark);
    border-radius: 0.8rem;
    padding: 1.8rem;
    height: 400px;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

body.dark .hero-code {
    background-color: #16161a;
    border: 1px solid rgba(255,255,255,0.1);
}

.code-header {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.code-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.code-dot.red {
    background-color: #ff5f56;
}

.code-dot.yellow {
    background-color: #ffbd2e;
}

.code-dot.green {
    background-color: #27c93f;
}

.code-content {
    font-family: 'Fira Code', monospace;
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.7;
    position: relative;
    height: calc(100% - 40px);
    overflow: auto;
    padding-right: 0.5rem;
}

.code-content::-webkit-scrollbar {
    width: 6px;
}

.code-content::-webkit-scrollbar-track {
    background: transparent;
}

.code-content::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.code-line {
    display: block;
    margin-bottom: 0.6rem;
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.code-keyword {
    color: #6c5ce7;
}

.code-string {
    color: #fdcb6e;
}

.code-comment {
    color: #7f8c8d;
    font-style: italic;
}

.code-number {
    color: #00cec9;
}

.code-operator {
    color: #fd79a8;
}

.code-function {
    color: #74b9ff;
}

.code-html {
    color: #e17055;
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.08;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    filter: blur(60px);
}

/* Sections */
.section {
    padding: var(--section-padding);
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 1.2rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(108, 92, 231, 0.3);
    z-index: -1;
    border-radius: 4px;
}

.section-title p {
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.7;
}

body.dark .section-title p {
    color: var(--light-gray);
}

/* Categories Filter */
.categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 3rem;
}

.category-btn {
    padding: 0.7rem 1.6rem;
    background-color: transparent;
    border: 2px solid var(--light-gray);
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: inherit;
    font-size: 0.95rem;
}

body.dark .category-btn {
    border-color: var(--dark-gray);
}

.category-btn:hover, .category-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Legal Notice */
.legal-notice {
    background-color: #ff4757;
    color: white;
    padding: 1rem;
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 3rem;
    border-radius: 0.6rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-card {
    background-color: var(--card-bg-light);
    border-radius: 1rem;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--light-gray);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}

body.dark .tool-card {
    background-color: var(--card-bg-dark);
    border-color: var(--dark-gray);
}

.tool-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.tool-card:hover {
    transform: translateY(-8px) !important;
    border-color: var(--primary);
}
body.dark .tool-card:hover {
  transform: translateY(-8px) !important;
    border-color: var(--primary);
}

.tool-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 2;
}

.badge-free {
    background-color: var(--secondary);
    color: var(--dark);
}

.badge-vip {
    background-color: var(--accent);
    color: white;
}

.tool-image {
    height: 180px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.tool-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 206, 201, 0.1));
    opacity: 0;
    transition: var(--transition);
}

.tool-card:hover .tool-image::before {
    opacity: 1;
}

body.dark .tool-image {
    background-color: #1a1a2e;
}

.tool-image i {
    font-size: 4rem;
    color: var(--primary);
    transition: var(--transition);
}

.tool-card:hover .tool-image i {
    transform: scale(1.1);
}

.tool-content {
    padding: 1.8rem;
}

.tool-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.tool-content p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1rem;
}

body.dark .tool-content p {
    color: var(--light-gray);
}

.tool-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.2rem;
}

.tool-version {
    font-size: 0.85rem;
    color: var(--gray);
    background-color: var(--light-gray);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
}

body.dark .tool-version {
    background-color: var(--dark-gray);
    color: var(--light-gray);
}

/* Features Section */
.features {
    background-color: #f8f9fa;
}

body.dark .features {
    background-color: #16161a;
}

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

.feature-card {
    background-color: var(--card-bg-light);
    padding: 2.2rem;
    border-radius: 1rem;
    transition: var(--transition);
    border: 1px solid var(--light-gray);
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

body.dark .feature-card {
    background-color: var(--card-bg-dark);
    border-color: var(--dark-gray);
}

.feature-card:hover {
    transform: translateY(-8px) !important;
    border-color: var(--primary);
}

.feature-icon {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 1.8rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--gray);
    line-height: 1.7;
    font-size: 1rem;
}

body.dark .feature-card p {
    color: var(--light-gray);
}

/* CTA Section */
.cta {
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 6rem 1.5rem;
    position: relative;
    overflow: hidden;
    border-radius: 100px;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(255,255,255,0.05)" d="M0,0 L100,0 L100,100 L0,100 Z"></path></svg>');
    background-size: 120px 120px;
    opacity: 0.3;
}

.cta h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.8rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.cta p {
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.cta-buttons {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.cta .btn {
    background-color: white;
    color: var(--primary);
    min-width: 180px;
}

.cta .btn:hover {
    background-color: rgba(255,255,255,0.95);
}

.cta .btn-outline {
    background-color: transparent;
    border-color: white;
    color: white;
}

.cta .btn-outline:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: white;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 4rem 1.5rem 2rem;
}

body.dark footer {
    background-color: #0f0e17;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 1.8rem;
    color: var(--primary);
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid var(--dark-gray);
    color: var(--gray);
    font-size: 0.9rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-legal {
    background-color: rgba(255,71,87,0.2);
    color: white;
    padding: 1rem;
    border-radius: 0.6rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background-color: var(--light);
    z-index: 1500;
    transition: var(--transition);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
}

body.dark .mobile-menu {
    background-color: var(--dark);
    box-shadow: -5px 0 30px rgba(0,0,0,0.3);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-close:hover {
    transform: rotate(90deg);
    color: var(--primary);
}

.mobile-nav-links {
    list-style: none;
    flex-grow: 1;
}

.mobile-nav-links li {
    margin-bottom: 1.8rem;
}

.mobile-nav-links a {
    text-decoration: none;
    color: inherit;
    font-size: 1.3rem;
    font-weight: 500;
    transition: var(--transition);
    display: block;
    text-align: center;
    
}

.mobile-nav-links a:hover {
    color: var(--primary);
    transform: translateX(10px);
}

.mobile-menu-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--light-gray);
}

body.dark .mobile-menu-footer {
    border-top-color: var(--dark-gray);
}

.mobile-theme-toggle {
    display: block;
    align-items: center;
    gap: 1rem;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.8rem 0;
    width: 100%;
    text-align: center;
    margin-top: -250px
    
}

.mobile-theme-toggle i {
    font-size: 1.3rem;
    color: var(--primary);
}

/* Login/Logout button in mobile menu */
.mobile-login-btn {
    display: block;
    align-items: center;
    gap: 1rem;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.8rem 0;
    width: 100%;
    text-align: center;
    margin-top: 2.5rem;
    border-radius: 15px;
}

.mobile-login-btn i {
    font-size: 1.3rem;
    color: var(--primary);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    z-index: 1200;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-text {
        text-align: center;
    }

    .hero-text p {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-code-container {
        justify-content: center;
    }

    .hero-code {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links, .header-actions .btn {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero {
        padding-top: 5rem;
    }

    .section {
        padding: 3.5rem 1.5rem;
    }

    .cta {
        padding: 4rem 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    header {
        padding: 1rem 1.5rem;
    }

    .hero {
        padding: 4.5rem 1.5rem 2rem;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-text p {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-code {
        height: 350px;
        padding: 1.5rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .section-title p {
        font-size: 1rem;
    }

    .categories {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
        white-space: nowrap;
    }

    .categories::-webkit-scrollbar {
        display: none;
    }

    .category-btn {
        padding: 0.6rem 1.4rem;
        font-size: 0.9rem;
    }

    .tools-grid, .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .mobile-menu {
        width: 90%;
        padding: 2rem 1.5rem;
    }

    .mobile-nav-links a {
        font-size: 1.2rem;
    }
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

.pulse-animation {
    animation: pulse 4s ease-in-out infinite;
}

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

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

.delay-3 {
    animation-delay: 0.9s;
}

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

.animate-fadeInUp {
    animation: fadeInUp 0.8s forwards;
}

/* Filter Functionality */
.filter-section {
    display: none;
}

.filter-section.active {
    display: block;
}

.logout-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--primary);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(150%);
    transition: transform 0.4s ease-in-out;
    opacity: 0; /* Start hidden */
    visibility: hidden; /* Start hidden */
}

.logout-message.show {
    transform: translateX(0);
    opacity: 1; /* Show when active */
    visibility: visible; /* Show when active */
}