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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    color: white;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.site-name {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

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

.nav-item {
    position: relative;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-link:hover {
    color: #6366f1;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-item:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menus */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(15, 15, 35, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.3s ease;
    display: block;
}

.dropdown-link:hover {
    color: #6366f1;
}

/* Mobile Menu Button and Wallet Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.connect-wallet-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    white-space: nowrap;
}

.connect-wallet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.connect-wallet-btn.connected {
    background: linear-gradient(135deg, #10b981, #059669);
}

.wallet-icon {
    font-size: 16px;
}

.wallet-text {
    display: inline;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
}

.hero-content {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.search-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 16px 60px 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    border-color: #6366f1;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.search-button:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Responsive Design for Hero */
@media (max-width: 768px) {
    .hero-section {
        padding: 0 1rem;
        height: calc(100vh - 70px);
        margin-top: 70px;
    }

    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .search-container {
        max-width: 100%;
    }

    .search-input {
        padding: 14px 56px 14px 16px;
        font-size: 14px;
    }

    .search-button {
        width: 40px;
        height: 40px;
    }
}

/* Mobile Responsive Design - Comprehensive Mobile Optimization */
@media (max-width: 768px) {

    /* Navbar Container - Reduced padding for mobile */
    .navbar {
        padding: 0 1rem;
        height: 65px;
        /* Slightly shorter on mobile */
    }

    /* Logo Section - Smaller logo and text for mobile */
    .logo {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .site-name {
        font-size: 20px;
    }

    /* Navbar Actions - Better mobile spacing */
    .navbar-actions {
        gap: 0.75rem;
    }

    /* Connect Wallet Button - Icon only on mobile */
    .wallet-text {
        display: none;
    }

    .connect-wallet-btn {
        padding: 8px 10px;
        min-width: 40px;
        justify-content: center;
    }

    .wallet-icon {
        font-size: 18px;
    }

    /* Mobile Menu Button - Larger touch target */
    .mobile-menu-btn {
        display: block;
        padding: 8px;
        min-width: 40px;
        min-height: 40px;
        border-radius: 8px;
        transition: background-color 0.3s ease;
    }

    .mobile-menu-btn:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    /* Mobile Navigation Menu - Full width dropdown */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 15, 35, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        max-height: calc(100vh - 65px);
        overflow-y: auto;
    }

    .nav-menu.active {
        display: flex;
    }

    /* Mobile Navigation Items - Better touch targets */
    .nav-item {
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 16px 2rem;
        font-size: 16px;
        justify-content: space-between;
    }

        /* Mobile Dropdown Menus - Collapsible functionality */
        .dropdown {
            position: static;
            opacity: 0;
            visibility: hidden;
            max-height: 0;
            overflow: hidden;
            background: rgba(255, 255, 255, 0.05);
            margin: 0;
            border: none;
            border-radius: 0;
            box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
        }
    
        /* Mobile Dropdown Active State - Shows when toggled */
        .nav-item.mobile-dropdown-open .dropdown {
            opacity: 1;
            visibility: visible;
            max-height: 300px;
            /* Adjust based on content */
        }
    
        /* Mobile Dropdown Arrow Animation */
        .nav-item.mobile-dropdown-open .dropdown-arrow {
            transform: rotate(180deg);
        }
    
        .dropdown-item {
            padding: 12px 3rem;
        }
    
        .dropdown-link {
            font-size: 15px;
        }
    
        /* Hero Section - Mobile adjustments */
        .hero-section {
            padding: 0 1rem;
            height: calc(100vh - 65px);
            margin-top: 65px;
        }
    
        .hero-title {
            font-size: 2.2rem;
            margin-bottom: 1.5rem;
        }
    
        /* Search Container - Full width on mobile */
        .search-container {
            max-width: 100%;
        }
    
        .search-input {
            padding: 14px 56px 14px 16px;
            font-size: 16px;
            /* Prevent zoom on iOS */
        }
    
        .search-button {
            width: 40px;
            height: 40px;
            right: 6px;
        }

    /* Demo Banner - Mobile responsive */
    .demo-banner {
        padding: 10px 16px;
        font-size: 14px;
        margin-bottom: 20px;
        background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
        color: white;
        border-radius: 8px;
        position: relative;
        font-weight: 600;
    }
}

/* Extra Small Mobile Devices - Enhanced support for very small screens */
@media (max-width: 480px) {
    .navbar {
        padding: 0 0.75rem;
    }

    .site-name {
        font-size: 18px;
    }

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

    .nav-link {
        padding: 14px 1.5rem;
        font-size: 15px;
    }

    .dropdown-item {
        padding: 10px 2.5rem;
    }
}
