/* Search box container */
.search-container {
    position: fixed;
    bottom: 15px;
    left: 20px;
    z-index: 1000;
}

/* Search box styles - ONLY the search box has glowing effect when collapsed */
.search-box {
    position: relative;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    transition: all 0.3s ease;
    overflow: hidden;
    /* Very strong glowing effect with larger range when collapsed */
    box-shadow:
        0 0 25px rgba(102, 126, 234, 0.8),
        0 0 45px rgba(102, 126, 234, 0.6),
        0 0 65px rgba(102, 126, 234, 0.4),
        0 0 85px rgba(102, 126, 234, 0.2);
    animation: glow-pulse 2s infinite alternate;
}

.search-box.expanded {
    width: 320px;
    /* No glowing effect when expanded - only normal shadow */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    animation: none;
}

/* Enhanced glowing animation for collapsed state only */
@keyframes glow-pulse {
    0% {
        box-shadow:
            0 0 25px rgba(102, 126, 234, 0.8),
            0 0 45px rgba(102, 126, 234, 0.6),
            0 0 65px rgba(102, 126, 234, 0.4),
            0 0 85px rgba(102, 126, 234, 0.2);
    }
    100% {
        box-shadow:
            0 0 35px rgba(102, 126, 234, 1.0),
            0 0 55px rgba(102, 126, 234, 0.8),
            0 0 75px rgba(102, 126, 234, 0.6),
            0 0 95px rgba(102, 126, 234, 0.4),
            0 0 115px rgba(102, 126, 234, 0.2);
    }
}

/* Search icon */
.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 2;
    cursor: pointer;
}

.search-box.expanded .search-icon {
    color: #764ba2;
}

/* Input field */
.search-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 100px 0 50px;
    font-size: 16px;
    color: #333;
    caret-color: #667eea;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.search-box.expanded .search-input {
    opacity: 1;
    pointer-events: auto;
}

.search-input::placeholder {
    color: #999;
    font-style: italic;
}

/* Navigation controls */
.search-controls {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.search-box.expanded .search-controls {
    opacity: 1;
    pointer-events: auto;
}

.nav-button {
    width: 28px;
    height: 28px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.nav-button:hover {
    background: #764ba2;
    transform: scale(1.1);
}

.nav-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.results-count {
    color: #666;
    font-size: 12px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

/* Highlight styles */
.search-highlight {
    background-color: #ffeaa7;
    color: #2d3436;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.search-highlight.current {
    background-color: #fdcb6e;
    border: 2px solid #e17055;
    padding: 0 2px;
}

/* Responsive design */
@media (max-width: 768px) {
    .search-container {
        bottom: 15px;
        left: 15px;
    }

    .search-box.expanded {
        width: 280px;
    }

    .container {
        padding: 10px;
    }

    .content-section {
        padding: 20px;
    }

    h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .search-box.expanded {
        width: 240px;
    }

    .search-input {
        padding: 0 90px 0 50px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}