/* Scoped Header Styles */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #192734;
    padding: 12px 24px;
    border-bottom: 1px solid #38444d;
    position: sticky;
    top: 0;
    z-index: 100;
    transform: translateY(0);
    transition: transform .3s ease;
    will-change: transform;
}

.header .logo {
    font-size: 24px;
    font-weight: 700;
    color: #1d9bf0;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.header .search-container {
    flex: 1;
    max-width: 400px;
    margin: 0 24px;
    position: relative;
}

.header .search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: none;
    border-radius: 20px;
    background: #253341;
    color: #ffffff;
    font-size: 15px;
    outline: none;
    transition: background 0.2s;
}

.header .search-input:focus {
    background: #1c2732;
}

.header .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8b98a5;
}

.header .search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #192734;
    border: 1px solid #38444d;
    border-radius: 8px;
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header .search-results.active {
    display: block;
}

.header .search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.header .search-result-item:hover {
    background: #253341;
}

.header .creator-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1d9bf0;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.header .creator-search-name {
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
}

.header .no-results {
    padding: 16px;
    text-align: center;
    color: #8b98a5;
    font-size: 14px;
}

.header .header-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header .icon-button {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.header .icon-button:hover {
    background: #253341;
}

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

.header .profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #192734;
    border: 1px solid #38444d;
    border-radius: 12px;
    min-width: 280px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
}

.header .profile-menu.active {
    display: block;
}

.header .profile-menu-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header .profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d9bf0 0%, #0d7cc1 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

.header .profile-info {
    flex: 1;
    min-width: 0;
}

.header .profile-username {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header .profile-email {
    font-size: 13px;
    color: #8b98a5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header .profile-menu-divider {
    height: 1px;
    background: #38444d;
    margin: 8px 0;
}

.header .profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 15px;
}

.header .profile-menu-item:hover {
    background: #253341;
}

.header .profile-menu-item:first-of-type {
    border-radius: 12px 12px 0 0;
}

.header .profile-menu-item:last-of-type {
    border-radius: 0 0 12px 12px;
}

.header .profile-menu-item svg {
    color: #8b98a5;
    flex-shrink: 0;
}

.header .profile-menu-item span {
    flex: 1;
}

/* Auth Button (Sign In) */
.header .auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: #1d9bf0;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
}

.header .auth-button:hover {
    background: #1a8cd8;
}

.header .auth-button:active {
    background: #1570b5;
}

/* Responsive Header Styles */
@media (max-width: 768px) {
    .header {
        padding: 8px 16px;
    }
    
    .header .search-container {
        margin: 0 12px;
        max-width: 200px;
    }
}
