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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #0f172a;
    color: white;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-container {
    height: 100%;
    padding: 0 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s;
}

.navbar-logo img {
    height: 35px;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
}

.logo-icon {
    font-size: 24px;
}

.navbar-links {
    display: flex;
    gap: 25px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover {
    color: white;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s;
}

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

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Mode Selector */
.mode-selector-container {
    position: relative;
}

.mode-selector-btn {
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-selector-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mode-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 200px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: dropdownFade 0.2s ease;
}

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

.mode-option {
    width: 100%;
    padding: 12px 20px;
    background: none;
    border: none;
    color: #d1d5db;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
}

.mode-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.mode-option.active {
    background: rgba(37, 99, 235, 0.3);
    color: white;
    font-weight: 600;
}

/* Scan Button */
.nav-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s;
}

.nav-button:hover {
    color: white;
    transform: rotate(180deg);
}

/* Profile Menu */
.profile-menu-container {
    position: relative;
}

.profile-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    background: #328492;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: transform 0.3s;
}

.profile-button:hover .profile-avatar {
    transform: scale(1.1);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 250px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: dropdownFade 0.2s ease;
}

.profile-info {
    padding: 15px;
}

.profile-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.profile-email {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item {
    width: 100%;
    padding: 12px 15px;
    background: none;
    border: none;
    color: white;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item.logout {
    color: #ef4444;
}

/* Main Content */
.main-content {
    padding-top: 70px;
}

/* Home Container */
.home-container {
    min-height: 100vh;
    background: linear-gradient(to bottom right, #0f172a, #1e3a8a, #0f172a);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Search bar container */
.search-bar {
    position: relative;
    display: inline-block;
}

/* Input with subtle depth */
.search-bar input {
    width: 450px;
    height: 50px;
    border: 2px solid #07505a;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15); /* NEW */
}

/* Button with matching lower depth */
.search-bar button {
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 50px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #07505a 0%, #0b7b86 100%);
    color: #ccc;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 1.5px 3px rgba(0,0,0,0.20);
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-bar button i{
    font-size: 28px;
    pointer-events: none;
}

.search-bar button:hover {
    background-color: #0a6b78;
}

/* Expansion */
.search-bar:hover input,
.search-bar input:focus {
    width: 700px;
    outline: none;
    background-color: rgba(255, 255, 255, 0.7);
}

.search-bar:hover button,
.search-bar input:focus + button {
    width: 120px;
}

/* Button press */
.search-bar button:active {
    transform: scale(0.97);
}

/* Subtle glow */
.search-bar input:focus {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15), 
                0 0 6px rgba(7, 80, 90, 0.25);
}

/* Placeholder */
.search-bar input::placeholder {
    color: #06444c;
    opacity: 0.6;
}


/* Animated Background */
.animated-bg {
    position: absolute;
    inset: 0;
    opacity: 0.2;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: pulse 4s ease-in-out infinite;
}

.bubble-1 {
    top: 80px;
    left: 80px;
    width: 300px;
    height: 300px;
    background: #3b82f6;
}

.bubble-2 {
    bottom: 80px;
    right: 80px;
    width: 400px;
    height: 400px;
    background: #a855f7;
    animation-delay: 1s;
}

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

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-title-section {
    margin-bottom: 4rem;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.hero-title {
    font-size: 6rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #bfdbfe;
    font-weight: 300;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 4rem;
    justify-items: center;
    align-items: start;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.5rem;
    }
}

/* Category Card */
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    transition: all 0.5s ease;
    height: 340px;
    width: 100%;
    max-width: 220px;
    display: block;
}

.category-card.active {
    cursor: pointer;
}

.category-card.active:hover {
    transform: scale(1.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.category-card.inactive {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Card Glass Background */
.card-glass {
    position: absolute;
    inset: 0;
    background: rgba(30, 41, 59, 0.3);
    backdrop-filter: blur(16px);
    border: 1px solid #07505a;
}

/* Hover Bubbles */
.hover-bubbles {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}

.category-card:hover .hover-bubbles {
    opacity: 1;
}

.floating-bubble {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
}

.floating-bubble.bubble-1 {
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    animation: float-slow 8s ease-in-out infinite;
}

.floating-bubble.bubble-2 {
    bottom: 0;
    left: 0;
    width: 130px;
    height: 130px;
    animation: float-slower 10s ease-in-out infinite;
}

.floating-bubble.bubble-3 {
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    transform: translate(-50%, -50%);
    animation: float 6s ease-in-out infinite;
}

/* Bubble Animations */
@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    33% { transform: translate(calc(-50% + 30px), calc(-50% - 30px)) scale(1.1); }
    66% { transform: translate(calc(-50% - 20px), calc(-50% + 20px)) scale(0.9); }
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, -40px) scale(1.2); }
}

@keyframes float-slower {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 30px) scale(0.8); }
}

/* Gradient Colors for Bubbles */
.gradient-movies { background: linear-gradient(to bottom right, #2563eb, #9333ea); }
.gradient-series { background: linear-gradient(to bottom right, #9333ea, #ec4899); }
.gradient-anime-series { background: linear-gradient(to bottom right, #ec4899, #ef4444); }
.gradient-books { background: linear-gradient(to bottom right, #16a34a, #14b8a6); }
.gradient-audiobooks { background: linear-gradient(to bottom right, #14b8a6, #06b6d4); }
.gradient-tv { background: linear-gradient(to bottom right, #ea580c, #eab308); }

/* Card Content */
.card-content {
    position: relative;
    padding: 2rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-icon {
    color: white;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.category-card:hover .card-icon {
    transform: scale(1.25);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    text-align: center;
    line-height: 1.4;
}

.coming-soon {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Hover Border */
.hover-border {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255, 255, 255, 0);
    border-radius: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

.category-card.active:hover .hover-border {
    border-color: #07505a;
}

/* Responsive Adjustments */
@media (max-width: 1023px) {
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .category-card {
        height: 200px;
    }

    .navbar-links {
        display: none;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }

    .search-bar {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .search-bar input {
        width: 80vw;
        max-width: 320px;
        height: 45px;
        font-size: 14px;
        padding-right: 55px;
    }

    .search-bar button {
        width: 50px;
        height: 45px;
        font-size: 22px;
        right: 0;
    }

    .search-bar:hover input,
    .search-bar input:focus {
        width: 90vw;
        max-width: 360px;
    }

    .search-bar:hover button,
    .search-bar input:focus + button {
        width: 65px;
    }

    .search-bar i {
        right: 18px;
        font-size: 18px;
    }

    .card-title {
        font-size: 1.125rem;
    }
    
    .category-card {
        height: 150px;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .categories-grid {
        gap: 0.75rem;
    }

    .navbar-container {
        padding: 0 3%;
    }

    .navbar-left {
        gap: 20px;
    }

    .navbar-right {
        gap: 10px;
    }

    .mode-selector-btn {
        padding: 0.4rem 1rem;
        font-size: 12px;
    }
}