/* ===============================
   YOUTUBE SEARCH – FINAL UI
   =============================== */

/* Container */
.youtube-search-container {
    max-width: 720px;
    margin: 0 auto;
}

/* Animated Brand Border */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 60px;
    padding: 3px;

    background: linear-gradient(
        120deg,
        #012cff,
        #00d2ff,
        #012cff,
        #00158a
    );
    background-size: 300% 300%;
    animation: borderFlow 6s linear infinite;
}

/* Inner glass layer */
.search-box::after {
    content: "";
    position: absolute;
    inset: 3px;
    background: rgba(2, 6, 23, 0.92);
    border-radius: 55px;
    z-index: 0;
}

/* SEARCH INPUT */
#youtube-search-title {
    position: relative;
    z-index: 1;
    flex: 1;

    height: 60px;
    padding: 0 70px 0 25px;

    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.3px;

    border: none !important;
    outline: none;

    background-color: #000814 !important;
    color: #ffffff !important;
    caret-color: #00d2ff;

    border-radius: 50px;

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.12),
        inset 0 0 22px rgba(1,44,255,0.28);

    transition: all 0.3s ease;
}

/* Focus state */
#youtube-search-title:focus {
    background-color: #000000 !important;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.2),
        inset 0 0 28px rgba(1,44,255,0.45);
}

/* Placeholder */
#youtube-search-title::placeholder {
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}

/* Search Icon (RIGHT SIDE) */
.search-icon {
    position: absolute;
    right: 22px;
    z-index: 2;
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    pointer-events: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

/* Clear Button */
.clear-search {
    position: absolute;
    right: 55px;
    z-index: 2;
    background: none;
    border: none;
    font-size: 20px;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
}

/* Focus Glow */
.search-box:focus-within {
    animation-play-state: paused;
    box-shadow:
        0 0 20px rgba(1,44,255,0.6),
        0 0 45px rgba(0,210,255,0.35);
}

.search-box:focus-within .search-icon {
    color: #00d2ff;
    transform: scale(1.2);
}

/* Border animation */
@keyframes borderFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* Mobile */
@media (max-width: 600px) {
    #youtube-search-title {
        font-size: 16px;
        height: 54px;
    }
}
