/* User Sidebar CSS */
.user-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background: #fff;
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.user-sidebar.active {
    right: 0;
}

.user-sidebar-header {
    background: linear-gradient(135deg, #238564 0%, #1a6d51 100%);
    padding: 30px 20px;
    color: #fff;
    text-align: center;
    position: relative;
}

.user-sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    color: #fff;
}

.user-info-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #333;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 10px;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: #f0f0f0;
}

.user-avatar-large img, .user-avatar-large svg {
    width: 100%;
    height: 100%;
    display: block;
}

.user-nickname-large {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.google-login-btn {
    display: inline-flex;
    align-items: center;
    background: #238564;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.google-login-btn:hover {
    background: #1a6d51;
}

.google-login-btn svg {
    margin-right: 8px;
}

.sidebar-section {
    padding: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #238564;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.section-title svg {
    margin-right: 8px;
}

.user-center-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.grid-item {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.grid-item:hover {
    transform: translateY(-2px);
    background: #f0f2ff;
}

.grid-item.fav { background-color: #fff5f5; }
.grid-item.dl { background-color: #f5f7ff; }

.grid-item-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.fav .grid-item-icon { background: #ff4f4f; color: #fff; }
.dl .grid-item-icon { background: #4f79ff; color: #fff; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.category-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px 5px;
    text-align: center;
    text-decoration: none;
    color: #555;
    font-size: 13px;
    transition: all 0.2s;
}

.category-item:hover {
    border-color: #238564;
    color: #238564;
}

.category-item-icon {
    margin-bottom: 5px;
    color: #238564;
}

/* Header User Section */
.header-user-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 20px;
    transition: background 0.2s;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    margin: 0 10px;
}

.header-user-info:hover {
    background: rgba(255,255,255,0.2);
}

.header-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.header-avatar svg {
    width: 100%;
    height: 100%;
}

.header-nickname {
    font-size: 13px;
    color: #fff;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .user-sidebar {
        width: 85%;
        right: -85%;
    }
    .header-nickname {
        display: none;
    }
    .header-user-info {
        padding: 5px;
        margin: 0 5px;
    }
    .header-avatar {
        margin-right: 0;
    }
}
