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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(102, 126, 234, 0.1);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

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

/* Floating Shapes Background */
.floating-shapes {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--gradient);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--gradient-2);
    top: 50%;
    right: -50px;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    bottom: -50px;
    left: 30%;
    animation-delay: 10s;
}

.shape-4 {
    width: 250px;
    height: 250px;
    background: var(--gradient);
    top: 30%;
    left: -125px;
    animation-delay: 15s;
}

.shape-5 {
    width: 180px;
    height: 180px;
    background: var(--gradient-2);
    bottom: 20%;
    right: 10%;
    animation-delay: 7s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) rotate(120deg);
    }
    66% {
        transform: translateY(30px) rotate(240deg);
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
}

.logo-icon {
    font-size: 1.8rem;
    animation: pulse 2s infinite;
}

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

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

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

.btn-nav {
    background: var(--gradient);
    color: var(--white) !important;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu-list {
    list-style: none;
    padding: 2rem;
}

.mobile-menu-list li {
    margin-bottom: 1rem;
}

.mobile-menu-list a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1.1rem;
    display: block;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.mobile-menu-list a:hover {
    color: var(--primary-color);
}

.btn-nav-mobile {
    background: var(--gradient);
    color: var(--white) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    display: inline-block;
    margin-top: 1rem;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 4rem 2rem;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

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

.badge {
    display: inline-block;
    background: linear-gradient(135deg, #f093fb20 0%, #f5576c20 100%);
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.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);
    -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;
}

/* URL Shortener */
.url-shortener {
    margin-bottom: 2rem;
}

.url-input-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.url-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.shorten-btn {
    background: var(--gradient);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    white-space: nowrap;
}

.shorten-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-icon {
    font-size: 1.2rem;
}

.shortened-result {
    display: none;
    animation: slideIn 0.5s ease;
}

.shortened-result.show {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-container {
    background: var(--bg-light);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.result-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.result-link-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.result-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.copy-btn {
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

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

.copy-btn.copied {
    background: #48bb78;
    border-color: #48bb78;
    color: var(--white);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Hero Illustration - Updated with proper layering */
.illustration-container {
    position: relative;
    height: 500px;
}

/* Main illustration with transparency and lower z-index */
.main-illustration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1; /* Lower z-index */
}

.illustration-circle {
    width: 250px;
    height: 250px;
    background: var(--gradient);
    opacity: 0.8; /* 80% transparency as requested */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rotate 20s linear infinite;
}

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

.circle-emoji {
    font-size: 5rem;
    animation: counter-rotate 20s linear infinite;
}

@keyframes counter-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

/* Floating cards wrapper with higher z-index */
.floating-cards-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2; /* Higher z-index - cards appear above main illustration */
}

.floating-card {
    position: absolute;
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: floatCard 3s ease-in-out infinite;
    z-index: 2; /* Ensure cards are above the main illustration */
}

.card-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 10%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 2s;
}

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

.card-icon {
    font-size: 1.5rem;
}

.card-text {
    font-weight: 600;
    color: var(--text-dark);
}

/* Features Section */
.features {
    padding: 5rem 2rem;
    background: var(--bg-light);
}

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

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.feature-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* How It Works */
.how-it-works {
    padding: 5rem 2rem;
    background: var(--white);
}

.steps-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-description {
    color: var(--text-light);
}

.step-icon {
    font-size: 2rem;
    margin-top: 1rem;
}

.step-connector {
    flex: 0 0 100px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    position: relative;
    top: -50px;
}

/* Stats Section */
.stats-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
}

.stats-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.stats-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.stats-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.cta-btn {
    background: var(--gradient);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Mobile CTA Section */
.mobile-cta {
    display: none;
    padding: 3rem 2rem;
    background: var(--gradient);
    text-align: center;
}

.mobile-cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

.mobile-cta-title .gradient-text {
    color: var(--white);
    opacity: 0.9;
}

.mobile-cta-text {
    color: var(--white);
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.mobile-cta-btn {
    background: var(--white);
    color: var(--primary-color);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 2rem 1rem;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: #a0aec0;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.social-link:hover {
    background: var(--primary-color);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0aec0;
}

/* Mobile Responsive - Enhanced */
@media (max-width: 768px) {
    /* Navigation */
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
    }

    /* Hero Section */
    .hero {
        padding: 2rem 1rem;
        min-height: auto;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    /* URL Shortener Mobile */
    .url-input-container {
        flex-direction: column;
    }

    .url-input {
        width: 100%;
    }

    .shorten-btn {
        width: 100%;
        justify-content: center;
    }

    .result-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-link-container {
        width: 100%;
        justify-content: space-between;
    }

    /* Hero Stats Mobile */
    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    /* Hide illustration on mobile */
    .hero-illustration {
        display: none;
    }

    /* Features Grid Mobile */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    /* How It Works Mobile */
    .steps-container {
        flex-direction: column;
        gap: 2rem;
    }

    .step-connector {
        display: none;
    }

    /* Stats Section Mobile */
    .stats-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats-title {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Show mobile CTA */
    .mobile-cta {
        display: block;
    }

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

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Section adjustments */
    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* Padding adjustments */
    .features,
    .how-it-works,
    .stats-section {
        padding: 3rem 1rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .stat-item {
        flex: 1;
        min-width: 100px;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

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

    .feature-card {
        padding: 1.25rem;
    }

    .feature-icon {
        font-size: 2.5rem;
    }

    .feature-title {
        font-size: 1.1rem;
    }

    .feature-description {
        font-size: 0.9rem;
    }
}

/* Tablet view */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
    }

    .hero-illustration {
        max-width: 500px;
        margin: 0 auto;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animations for mobile */
@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    .floating-shapes {
        display: none; /* Hide background shapes on mobile for performance */
    }

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